xxiaoxiong/dsh-prometheus
Exposes bounded Prometheus metrics for DSH sessions, agents, LLM calls, tools, approvals, subagents, and jobs, with a Grafana dashboard and a loopback-only endpoint by default.
dsh-prometheus exposes Prometheus metrics and a ready-to-import Grafana dashboard for DeepSeek Harness. It observes public DSH lifecycle seams: active sessions, agent turns/steps/errors/duration histograms, LLM request rate and terminal status with disjoint input/output/reasoning/cache token counters, tool-call rate and latency, approval request and fixed-outcome counters, subagent starts/outcomes/duration, background job lifecycle, and process start time. Metric series stay bounded with per-key label vocabulary caps (maxLabelValues 64, maxLabelValueLength 80) and only four runtime label keys (provider, model, tool, job kind). It never exports prompts, message content, tool arguments, file paths, or session/agent/call ids. Includes docker-compose example (Prometheus + Grafana with a provisioned DeepSeek Harness / Overview dashboard) and starter alerts.
Install
dsh plugin --profile monitoring add dsh-prometheusnpm dsh-prometheus 0.1.0 verified 2026-09-04 (repository field → github.com/xxiaoxiong/dsh-prometheus; README EN primary w/ zh edition). Install into a DSH profile, e.g. dsh plugin --profile monitoring add dsh-prometheus, then verify the bundle layer with dsh --profile monitoring --dump-config (should include the prometheus row) before booting.
Compatibility
Tested against DSH 0.1.0-rc.6. Prometheus/OpenMetrics scrape via prom-client content type; optional standalone endpoint on 127.0.0.1:9464 when no public webServer is available.
Details
- Repo: xxiaoxiong/dsh-prometheus
- Category: Development & Runtime
- Stars: 0
- Version: npm dsh-prometheus 0.1.0 (developer preview)
- Last push: 2026-08-22
- First seen: 2026-08-15
Recent updates
mode auto registers an exact /metrics route on an existing webServer or starts a standalone loopback endpoint on 127.0.0.1:9464; remote exposure has no built-in auth and must be acknowledged with allowRemote.
FAQ
- What does it monitor?
- Sessions, agent turns and errors, LLM requests with token counters, tool calls, approvals, subagents, background jobs, and process start time — all as bounded Prometheus series.
- Does it export conversation content?
- No. It never exports prompts, messages, tool arguments/results, error text, file paths, or ids; only four label keys exist (provider, model, tool, job kind) with vocabulary caps.
- How do I scrape it?
- By default it registers /metrics on an active DSH webServer, or starts a standalone endpoint on 127.0.0.1:9464 (mode auto). A docker-compose example provisions Prometheus + Grafana with a ready dashboard.
Alternatives
guhanfei-ai/dsh-grafana · 940842546/dsh-usage-billing