Services

Resources

Company

GenAI semantic conventions

GenAI semantic conventions are the OpenTelemetry standard names for telemetry about generative AI, such as model calls, token usage, tool calls and agent runs. They define attributes in the gen_ai.* namespace, plus operation names and metrics. They now live in their own repository, open-telemetry/semantic-conventions-genai, and are still marked Development.

How it works

A span for a model call carries attributes such as gen_ai.operation.name, gen_ai.request.model, gen_ai.response.model, gen_ai.provider.name and gen_ai.usage.input_tokens. Agent runs use operation names such as invoke_workflow, invoke_agent, chat and execute_tool. Libraries emit metrics such as gen_ai.client.token.usage and gen_ai.client.operation.duration today. Newer drafts replace them with gen_ai.client.inference.* metrics.

Why it matters in production

Shared names let you switch instrumentation libraries or backends without rewriting every dashboard query. Because the conventions are still in Development, names and labels can change between releases. Pin library versions and expect to update dashboards when you upgrade.

See also

References

  1. Origin of the term

  2. OpenTelemetry GenAI semantic conventions

  3. OpenTelemetry semantic conventions overview

Comic about GenAI semantic conventions: Kai swaps the tool that records AI calls, and the cost chart goes empty because the old tool wrote tokens_in and the new one prompt_tokens; both tools then use the standard name gen_ai.usage.input_tokens, so one query works for both; the names are an OpenTelemetry standard still in draft, so the team pins versions and rechecks charts.