CodePrometheus/dsh-observability ↗★ 0
dsh-observability
OpenTelemetry traces backend for the DeepSeek Harness telemetry seam: folds agent session events into OTLP span trees
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CodePrometheus/dsh-observability说明文档
阅读完整 README ↗dsh-observability
English | 中文
为 DeepSeek Harness(dsh)导出 OpenTelemetry traces:把每个 agent 会话导出成 OTLP span 树——turn 对应 trace,模型 step 对应子 span,工具调用对应该 step 的子 span——带 GenAI 语义约定属性,发往任何接受 OTLP/HTTP 的 collector。
这是社区插件(dsh-plugin topic),不属于官方仓库。它实现 harness 公开的遥测 Service Definition(@deepseek-ai/dsh-session-telemetry),作为官方 Provider 之外的第二个 Service Provider——官方那个导出的是 OTLP logs。
安装
本包自带 cordis.patch.yml,因此可以作为 profile bundle 安装:
dsh plugin --profile web add dsh-observability
export DSH_OBSERVABILITY_MODE=FULL
export DSH_OBSERVABILITY_OTLP_URL=http://127.0.0.1:4318/v1/traces
在 DSH_OBSERVABILITY_MODE 明确开启之前,共享始终关闭。配置了 endpoint 不等于同意上传会话内容,参见 离开本机的数据。
自带的 patch 会关掉 base profile 的 session-telemetry-otel 行:遥测 Service Definition 每个 context 只接受一个后端,重复加载直接抛错。
也可以作为显式的 cordis.yml 行挂载:
- id: session-telemetry-otlp-traces
name: dsh-observability
config:
mode: FULL # FULL | FEEDBACK_ONLY | DISABLED(默认)
exporter: # 原样透传给 SDK 的 OTLP/HTTP trace exporter
url: http://127.0.0.1:4318/v1/traces
compression: gzip
processor: {} # 可选,原样透传给 BatchSpanProcessor
shutdownTimeoutMillis: 3000
maxAttributeChars: 32768
配置
| 字段 | 含义 |
|---|---|
mode | FULL 实时导出每个会话;FEEDBACK_ONLY 仅在用户记录 feedback 时回放并导出 canonical 会话日志;DISABLED(默认)不构造任何东西,也没有任何数据离开进程。词表与同意语义都属于 Service Definition,与官方 Provider 完全一致。 |
exporter | 完整的 OTLPExporterNodeConfigBase 对象,原样透传给 OTLP/HTTP trace exporter。url 是本包唯一要求并自行校验的字段,且必须是完整的 traces 路径(…/v1/traces)。 |
processor | 原样透传给 BatchSpanProcessor(scheduledDelayMillis、maxQueueSize、maxExportBatchSize 等);批量、重试和丢失策略都是 SDK 文档化的行为。 |
shutdownTimeoutMillis |