Skip to main content

A log tracking client integration code for OpenAI agents sdk

Project description

A log tracking client integration code for OpenAI agents sdk

Quick Start

  1. 安装client lib sdk
pip install tracker2k
  1. 集成agent服务代码
import tracker2k

# 注:
#   1.app_name:指服务的应用名字,例如:chuxing-assistant, travel-assistant
#   2.env_name:指服务应用的环境名称,例如:dev, pre, prod
#   3.endpoint:指链路远端服务地址
#       - 测试环境:https://xx-offline.xx.xx/asst/logagent/xx
#       - 线上环境:http://xx.xx.xx.xx:xx/logagent/xx
tracker2k.init(app_name="xx-assistant", env_name="dev", endpoint="https://xx-offline.xx.xx/asst/logagent/xx")


# 注:
#   1 trace_id 对应链路的trace_id
#   2. metadata中的query、uid、sid,对应用户请求query、用户id、会话id

with trace(
        workflow_name=f"LPY Agent ({session_id})",
        group_id=f'Lpy Agent',
        trace_id=trace_id,
        metadata={"query": user_input, "uid": uid, "sid": session_id}
    ):
    ...your code...
  1. 查看追踪数据

界面地址(测试环境):https://xx.xx.xx.xx/#/traceOverview

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracker2k-0.0.5.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracker2k-0.0.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file tracker2k-0.0.5.tar.gz.

File metadata

  • Download URL: tracker2k-0.0.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for tracker2k-0.0.5.tar.gz
Algorithm Hash digest
SHA256 faf6d9d58dc5c405b47fcd993685449c69a398adffe9e99882c540f8969c39e1
MD5 58da4e784e14ce6131cb284771a7ea8f
BLAKE2b-256 71bc7478eda7121cb6db64fbb11468fab4060bbb158ed60ee8088fb09c3fbbb2

See more details on using hashes here.

File details

Details for the file tracker2k-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: tracker2k-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for tracker2k-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 547d650aeb64dcff7119aa3966c7ac8267b34e2332185b7a1f76181f0aee6209
MD5 c2f5a2e545674de2ccb98801f3ebaf15
BLAKE2b-256 38a4f1dc2c07c7278d624f095247318ffe8fe478930cfa1d8ced1440840195f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page