返回目录
部署运维 插件

dsh-otel

lengrufeng2008/dsh-otel

Export dsh-token-audit JSON summaries as OTLP/JSON metrics.

Stars
0
Forks
0
Issues
0
更新
23 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:lengrufeng2008/dsh-otel

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

OTel Export for DSH

DSH has cost dashboards, but no machine-readable export. This turns a dsh-token-audit JSON summary into OTLP/JSON metrics for Grafana, Langfuse, or any collector that accepts JSON.

It is a summary exporter: cost, tokens, sessions, calls, projected monthly, idle/peak, and per-model totals. It does not produce per-turn or per-tool spans.

Pipeline

dsh-token-audit --all --format json > audit.json
node bin/dsh-otel.mjs --input audit.json --output otlp.json

In DSH:

Use otel_export on audit.json, format=summary.

Metrics

  • dsh.cost.cny
  • dsh.tokens.input, dsh.tokens.cache_read, dsh.tokens.output
  • dsh.sessions, dsh.calls
  • dsh.cost.projected_monthly_cny
  • dsh.cost.idle_cny, dsh.cost.peak_cny
  • per model: dsh.model.cost.cny, dsh.model.calls, dsh.model.tokens.output

Boundaries

  • No network: it writes JSON; your collector uploads it.
  • No per-turn/per-tool spans, no live streaming, no dashboard.
  • It inherits the audit's pricing; it does not re-price.
  • Redact the audit before exporting if titles/paths are sensitive.
  • OTLP/JSON only, not protobuf.

Tests

npm test

Provenance

Inspired by claude-code-otel; no source copied. See NOTICE.md. License: MIT.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类部署运维
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: observability。