About this project
This project is a plugin for DeepSeek Harness (DSH) that provides full OpenTelemetry observability for AI agent runs. It exports traces, metrics, and logs to GreptimeDB, a time-series database, and ships with seven pre-built Grafana dashboards for visualization.
The plugin instruments every turn, model call, and tool execution in a DSH session, recording token counts (input, output, cache reads, cache writes, reasoning tokens), durations, tool names, outcomes, and error information. Traces are structured as turn spans with chat and tool spans as siblings, correlated by step identifiers. Metrics include histograms for token usage, operation durations, and tool invocation counters. Logs capture one record per session event with extractable columns for session ID, event type, turn, and step.
Seven Grafana dashboards cover different aspects: Overview (token counts, speed, cache usage), Cost (monetary estimates using configurable per-million-token rates), Sessions (conversation duration, turn counts, failures), Agent Loop (tool frequency, failure rates, model calls per turn), Trace Explorer (span-by-span waterfall for a single turn), Log Explorer (filterable session events), and Metrics (PromQL-based views for longer retention). The Cost dashboard uses four configurable rates for uncached input, cache read, cache write, and output tokens, with defaults matching DeepSeek's published pricing.
The plugin installs as an ordinary DSH plugin via `dsh plugin add` and requires no collector or sidecar. Configuration supports custom endpoints, database names, authentication, signal selection, content privacy modes (none, full, full+prompt), retention TTL, and export timing. A positive allowlist ensures unknown event types export only their identity. Three categories of data never leave the machine in any mode: tool private metadata, internal error messages, and request stack traces.
The project targets specific DSH prerelease versions and includes compatibility tables. It integrates with TMA1, which proxies OTLP into a managed GreptimeDB. Known limitations include DSH's pre-release instability, experimental GenAI semantic conventions, TTL not reaching metric tables, and no per-turn flush.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.