Repository navigation
Description
The otel lexicon's GenAI preset (#2900, #2912) derives four metrics from spans under names of its own (genai.calls, genai.duration, genai.tokens.input, genai.tokens.output). grafana AgentDashboard reads them. The GenAI semantic conventions define the metrics that backends and dashboards expect instead: operation duration and token usage at the lexicon's pin (semantic-conventions v1.41.1), and agent, tool, workflow, cache, reasoning and MCP metrics on the unreleased main of open-telemetry/semantic-conventions-genai. This epic has the collector emit those under their real names where spans allow it, and adds the rules and dashboard that go with them.
Everything here is opt-in. A project that builds genAiPipeline() today gets byte-identical output unless it asks for the new metrics.
Sub-issues
| # | Issue | Depends on |
|---|---|---|
| 1 | #3040 otel: typed signal_to_metrics connector |
|
| 2 | #3041 otel: the v1.41.1 client metrics under their convention names | #3040 |
| 3 | #3044 otel: agent, tool, workflow, cache, reasoning and MCP metrics from semantic-conventions-genai |
#3041, the pin decision in #2913 |
| 4 | #3042 otel lint: high-cardinality GenAI attributes as metric attributes | #3040 for its fields |
| 5 | #3043 prometheus: GenAI recording rules, alerts, and cost from a declared price table | #3041; #3044 for agent and tool rules |
| 6 | #3045 grafana: AgentDashboard for the conventions' metrics |
#3041, #3043; #3044 for some panels |
#2913 carries the prerequisites: deltatocumulative (these connectors emit deltas, so remote write needs it), the sum connector bug (#3041 routes tokens around it), and the semantic-conventions-genai pin #3044 waits on. It stays a sub-issue of #2904, the closed epic it came from, and this epic depends on it.
What the collector can't derive
Some of the conventions' metrics need the whole agent run or the stream's timing, which one span doesn't carry. The collector passes these through from the SDK and derives nothing:
gen_ai.invoke_agent.inference_callsandgen_ai.invoke_agent.tool_callsgen_ai.client.operation.time_per_output_chunkgen_ai.client.operation.time_to_first_chunkat v1.41.1- the
gen_ai.server.*metrics
#3043 computes the average calls per run as a ratio of rates.
Related
- research: otel and prometheus against an aws-grade lexicon (codegen, lint, real-binary CI, operators, composites, ops, lifecycle, components) #2989: the broader otel and prometheus research this came out of.
- workspace: record what each agent run cost and which changes it made #3033: workspace run cost records. prometheus: GenAI recording rules, alerts, and cost from a declared price table #3043's price table uses the same currency and price-source fields.
Definition of done
- A collector built with the option emits the conventions' metrics that spans allow, with the attributes, units and buckets the conventions give.
- The same project's prometheus rules and grafana dashboard build from the collector's
GenAiMetricswithout restating any metric name. - Output without the option is unchanged.
- Every sub-issue is closed or explicitly re-scoped.
Activity
lex00 commentedon Oct 23, 2026
Closing as done for the semantic-conventions v1.41.1 half. 5 of the 6 sub-issues are closed (#3040, #3041, #3042, #3043, #3045), and the prerequisite #2913 is closed too. #3044 (agent, tool, workflow, cache, reasoning and MCP metrics from
semantic-conventions-genai) stays open as a standalone issue. It waits on #3073, the move of the pin to semantic-conventions-genai, which in turn waits for that repo to tag a release. No further work on this epic is possible until then, and #3378 already lists #3044 and #3073 as outside its scope.