Skip to content

docs(otel): add a provisioned Grafana + Tempo cost & governance dashboard - #75

Merged
prashar32 merged 1 commit into
mainfrom
feat/otel-grafana-dashboard
Jun 6, 2026
Merged

docs(otel): add a provisioned Grafana + Tempo cost & governance dashboard#75
prashar32 merged 1 commit into
mainfrom
feat/otel-grafana-dashboard

Conversation

@prashar32

Copy link
Copy Markdown
Owner

A ready-made cost & governance dashboard

The OTel export already puts cost, budget headroom, halt reason, and tool-call outcomes on every span — but to actually see them you had to write TraceQL by hand. This ships that view ready-made.

examples/otel/grafana/ is a Grafana + Tempo compose with the Tempo data source and a RiskKernel dashboard both provisioned: docker compose up, point RiskKernel's OTEL_EXPORTER_OTLP_ENDPOINT at it, and the dashboard is already there. No import step.

Ten panels, all from spans RiskKernel already emits (Tempo TraceQL metrics — no extra instrumentation, no metrics pipeline):

  • Total spend · output tokens · model calls · tool calls refused
  • Spend over time · spend by run
  • p95 latency by model · model-call rate by model
  • Tool calls by outcome (approved / blocked / denied / timeout) · budget halts by reason

The dashboard is plain Grafana JSON and works against any Tempo with TraceQL metrics enabled (the local-blocks processor), not just this compose.

Verified

Brought the stack up and drove real spans through RiskKernel's own otel emitter into Tempo, then confirmed all ten panel queries return correctly-grouped data through the same data-source path the Grafana panels use (/api/metrics/query_range): spend split across runs, tool calls across all four statuses, halts by both reasons, latency per model. Tempo boots cleanly with TraceQL metrics enabled; the data source and dashboard auto-provision (the dashboard lists with all 10 panels). Needs Tempo 2.7+ for sum_over_time — noted in the example README.

…oard

The OTel export already carries cost, budget headroom, halt reason, and
tool-call outcomes on every span, but seeing them meant writing TraceQL by
hand. This ships the view ready-made: a Grafana + Tempo compose with the data
source and a RiskKernel dashboard both provisioned, so it's `docker compose up`
with no import step.

Ten panels, all built from the spans RiskKernel already emits (Tempo TraceQL
metrics — no extra instrumentation): total spend / tokens / model calls / tool
calls refused, spend over time and per run, p95 latency and call rate by model,
tool calls by outcome, and budget halts by reason.

The dashboard JSON is plain Grafana and works against any Tempo with TraceQL
metrics enabled (the local-blocks processor), not just this compose.
@prashar32
prashar32 merged commit e3774e3 into main Jun 6, 2026
5 checks passed
@prashar32 prashar32 mentioned this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant