agent-rl-observability
轻量级可观测性 SDK,基于 OpenTelemetry,为 Agent-RL 平台提供分布式追踪能力。
安装
pip install agent-rl-observability
# 启用自动埋点(httpx 等第三方库)
pip install agent-rl-observability[auto]
# 启用完整功能(含 FastAPI 可视化端点)
pip install agent-rl-observability[full]
快速开始
from observability import setup_otel, trace, trace_span
setup_otel()
@trace("my.service.action")
def my_function():
with trace_span("sub.operation"):
pass
功能
| 模块 | 说明 |
|---|---|
core |
OTel 初始化、装饰器、TraceContext 传播、配置 |
auto_instrumentation |
httpx / requests / aiohttp / aiomysql / redis / aiokafka 自动埋点 |
middleware |
FastAPI / Starlette ASGI 中间件 |
api |
Trace 查看、瀑布图可视化、耗时分析端点 |
collector_protocol |
与 Collector 服务的数据契约 |
配置
通过环境变量配置:
| 变量 | 默认值 | 说明 |
|---|---|---|
OTEL_SERVICE_NAME |
"unknown" |
服务名 |
OTEL_EXPORTER_OTLP_ENDPOINT |
"http://localhost:4318" |
OTLP 导出地址 |
OBS_DISABLED |
"false" |
禁用可观测性 |
架构
业务服务 ──OTLP──▶ Collector 服务 ──▶ OceanBase / 告警
↑
@trace / trace_span / AutoTraceMiddleware
Metadata
Release files for agent-rl-observability 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_rl_observability-0.2.2.tar.gz | 113.1 kB | Without provenance | Details for agent_rl_observability-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_rl_observability-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for agent_rl_observability-0.2.2-py3-none-any.whl |
Total release size: 246.9 kB
Release files / agent_rl_observability-0.2.2.tar.gz
| Download URL | agent_rl_observability-0.2.2.tar.gz |
|---|---|
| Size | 113.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ab710ea0cd1168e589ba2864e4dda1c01880159d1b4ec6b7a57886fc1c74bd6
|
|
BLAKE2b-256 checksum How to use checksums |
fd26945b7feee1832653561f290df3e13a983ff2d9d65dd31c291bde6421033d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / agent_rl_observability-0.2.2-py3-none-any.whl
| Download URL | agent_rl_observability-0.2.2-py3-none-any.whl |
|---|---|
| Size | 133.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ca6c96985fd2e3fa7a449546f2312c92c1fdde46ff511dedf3a9731d5adaf43
|
|
BLAKE2b-256 checksum How to use checksums |
3a6c6f7108feb8d63b13a74ff07453da7b41412dbf32fba35c20ac499f89da30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for agent-rl-observability 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.