← All notes

Measure GenAI operations with OpenTelemetry metric instruments

Answer: OpenTelemetry metrics are runtime measurements captured by instruments on a Meter. The conventions describe Generative AI operations with metric instruments. Client metrics include gen_ai.client.operation.duration.

Meters and instruments

A metric is a measurement of a service captured at runtime. Application and request metrics are important indicators of availability and performance. A Meter Provider is a factory for Meters. In most applications a Meter Provider is initialized once, and that step typically includes Resource and Exporter initialization. A Meter creates metric instruments, capturing measurements about a service at runtime. Metric Exporters send metric data to a consumer. Common instruments include Counter, Asynchronous Counter, UpDownCounter, Asynchronous UpDownCounter, and Gauge. A Gauge measures a current value at the time it is read. An UpDownCounter can go up and down, for example a queue length.

GenAI metric instruments

GenAI conventions list metric instruments for Generative AI operations. An operation may be a request to an LLM or a function call. These are initial client metric instruments, and more may be added in the future. The status is Development. Client metrics include gen_ai.client.operation.duration. Model server metrics include request duration, time per output token, and time to first token. There is also a section for Generative AI agent metrics.

| instruments | measurements | |---|---| | Meter Provider | factory for Meters | | instruments | capture measurements about a service | | Counter | accumulating value that only increases | | UpDownCounter | value that can go down again |

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenTelemetry, Metrics; open-telemetry/semantic-conventions-genai (GitHub), Semantic conventions for generative AI metrics. CC-BY-4.0; Apache-2.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: OpenTelemetry, Metrics; open-telemetry/semantic-conventions-genai (GitHub), Semantic conventions for generative AI metrics. CC-BY-4.0; Apache-2.0.

Cite this

Permanent ID: iil:note:1m4v7gqb

iinventedlight. 2026. "Measure GenAI operations with OpenTelemetry metric instruments." iinventedlight Library, iil:note:1m4v7gqb, version of 2026-11-19. https://iinventedlight.com/library/notes/otel-genai-metrics/. License: CC-BY-4.0.

@misc{iil_note_1m4v7gqb,
  author = {{iinventedlight}},
  title = {{Measure GenAI operations with OpenTelemetry metric instruments}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-19},
  url = {https://iinventedlight.com/library/notes/otel-genai-metrics/},
  note = {Permanent ID iil:note:1m4v7gqb. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/otel-genai-metrics.md.