Skip to content
semconv.com
↑↓ move↵ openUse with your agent →

Generative AI

as of v1.45.0

Model calls, agents, tools and A2A. Split into its own repository in v1.44.0 and still unreleased.

gen_ai 100a2a 7openai 4

Attributes
111
Metrics
25
Signals
38
Stable
0
Deprecated
15

Signals

What this domain emits, and the attributes each one carries, most strongly required first. An attribute marked * is required on that signal; * is conditionally required.

Spans 22

Events 16

Metrics 25

  • gen_ai.client.embeddings.duration
    Developmenthistogram · sGenAI client embeddings operation duration.
  • gen_ai.client.embeddings.operation.input_tokens
    Developmenthistogram · {token}The number of input tokens used per embeddings operation.
  • gen_ai.client.inference.duration
    Developmenthistogram · sGenAI client inference operation duration.
  • gen_ai.client.inference.operation.input_tokens
    Developmenthistogram · {token}The number of input (prompt) tokens used per inference operation.
  • gen_ai.client.inference.operation.output_tokens
    Developmenthistogram · {token}The number of output (completion) tokens used per inference operation.
  • gen_ai.client.inference.time_per_output_chunk
    Developmenthistogram · sTime per output chunk, recorded for each chunk received after the first one, measured as the time elapsed from the end of the previous chunk
  • gen_ai.client.inference.time_to_first_chunk
    Developmenthistogram · sTime from the start of a logical inference operation to the first chunk in its streaming response.
  • gen_ai.client.inference.usage.cache_read.input_tokens
    Developmentcounter · {token}The number of input tokens served from a provider-managed cache.
  • gen_ai.client.inference.usage.cache_write.input_tokens
    Developmentcounter · {token}The number of input tokens written to a provider-managed cache.
  • gen_ai.client.inference.usage.input_tokens
    Developmentcounter · {token}The number of input (prompt) tokens used, including cached tokens.
  • gen_ai.client.inference.usage.output_tokens
    Developmentcounter · {token}The number of output (completion) tokens used, including reasoning tokens.
  • gen_ai.client.inference.usage.reasoning.output_tokens
    Developmentcounter · {token}The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
  • gen_ai.client.invoke_agent.duration
    Developmenthistogram · sGenAI client invoke agent operation duration.
  • gen_ai.client.operation.duration
    Developmenthistogram · sGenAI operation duration.
  • gen_ai.client.operation.time_per_output_chunk
    Deprecatedhistogram · sTime per output chunk, recorded for each chunk received after the first one, measured as the time elapsed from the end of the previous chunk
  • gen_ai.client.operation.time_to_first_chunk
    Deprecatedhistogram · sTime to receive the first chunk, measured from when the client issues the generation request to when the first chunk is received in the resp
  • gen_ai.client.token.usage
    Deprecatedhistogram · {token}Number of input and output tokens used.
  • gen_ai.execute_tool.duration
    Developmenthistogram · sThe duration of a single tool execution.
  • gen_ai.invoke_agent.duration
    Developmenthistogram · sThe end-to-end duration of a single in-process agent, workflow, or framework entrypoint invocation, from the moment the invocation starts un
  • gen_ai.invoke_agent.inference_calls
    Developmenthistogram · {inference_call}The number of inference (model) calls a GenAI agent, workflow, or framework entrypoint makes during a single invocation.
  • gen_ai.invoke_agent.tool_calls
    Developmenthistogram · {tool_call}The number of tool calls a GenAI agent, workflow, or framework entrypoint makes during a single invocation.
  • gen_ai.retrieval.duration
    Developmenthistogram · sThe duration of a retrieval operation - an execution of a framework retrieval pipeline that returns documents relevant to a query.
  • gen_ai.server.request.duration
    Developmenthistogram · sGenerative AI server request duration such as time-to-last byte or last output token.
  • gen_ai.server.time_per_output_token
    Developmenthistogram · sTime per output token generated after the first token for successful responses.
  • gen_ai.server.time_to_first_token
    Developmenthistogram · sTime to generate first token for successful responses.

Specification

  • Spansare bound by the trace specification — 312 requirements across 8 documents, 176 of them MUST or SHALL.
  • Metricsare bound by the metrics specification — 569 requirements across 8 documents, 296 of them MUST or SHALL.
  • Eventsare bound by the logs specification — 163 requirements across 5 documents, 84 of them MUST or SHALL.

The specification prose never names this domain. That is not an omission: the specification defines signals, not subject matter — what binds gen_ai telemetry is the general rules above, and the conventions themselves carry the rest.

On the wire, this lands in trace/v1/trace, metrics/v1/metrics, logs/v1/logs. Field-by-field definitions are under OTLP.

Attributes 111

gen_ai100 attributes

a2a7 attributes

openai4 attributes

Recent changes

Breaking and notable changes to this domain across the last 6 semantic-conventions releases.

59 more in the full release history

Topics are this site's grouping of upstream namespaces, not a structure the OpenTelemetry project publishes. JSON · All domains