Generative AI
as of v1.44.0Model calls, agents, tools and A2A. Split into its own repository in v1.44.0 and still unreleased.
- attributes
- 108
- metrics
- 24
- signals
- 25
- stable
- 0
- deprecated
- 12
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 17
- a2a.clientclientDevelopmentThis span describes an A2A call from the client side.
a2a.method.name*a2a.message.id*a2a.task.id*a2a.task.state*a2a.tenant*gen_ai.agent.description*gen_ai.agent.name*gen_ai.agent.version*gen_ai.conversation.id*a2a.message.reference_task_idsa2a.protocol.versionerror.type+2 more
- a2a.serverserverDevelopmentThis span describes processing of an A2A request by the server.
a2a.method.name*a2a.message.id*a2a.task.id*a2a.task.state*a2a.tenant*gen_ai.agent.description*gen_ai.agent.name*gen_ai.agent.version*gen_ai.conversation.id*a2a.message.reference_task_idsa2a.protocol.versionclient.address+4 more
- gen_ai.client.embeddingsclientDevelopmentDescribes a GenAI embeddings operation - a client call to a model or service that returns embeddings for one or more inp
gen_ai.provider.name*error.typegen_ai.embeddings.dimension.countgen_ai.operation.namegen_ai.request.encoding_formatsgen_ai.request.modelgen_ai.response.modelgen_ai.usage.input_tokensserver.addressserver.port
- gen_ai.client.inferenceclientDevelopmentThis span represents a logical client call to Generative AI model or service that generates a response or requests a too
gen_ai.provider.name*gen_ai.conversation.id*gen_ai.output.type*gen_ai.prompt.name*gen_ai.prompt.version*gen_ai.request.choice.count*gen_ai.request.seed*gen_ai.request.stream*gen_ai.request.top_k*error.typegen_ai.conversation.compactedgen_ai.operation.name+38 more
- gen_ai.create_agent.clientclientDevelopmentDescribes GenAI agent creation and is usually applicable when working with remote agent services.
gen_ai.provider.name*gen_ai.agent.description*gen_ai.agent.id*gen_ai.agent.name*gen_ai.agent.version*error.typegen_ai.operation.namegen_ai.request.modelserver.addressserver.portgen_ai.system_instructions
- gen_ai.execute_tool.internalinternalDevelopmentDescribes tool execution span.
gen_ai.operation.name*gen_ai.conversation.id*gen_ai.tool.call.id*error.typegen_ai.agent.namegen_ai.tool.descriptiongen_ai.tool.namegen_ai.tool.typegen_ai.tool.call.argumentsgen_ai.tool.call.result
- gen_ai.fetch_response.clientclientDevelopmentDescribes a request to a Generative AI provider that fetches a previously generated model response by its identifier.
gen_ai.operation.name*gen_ai.provider.name*gen_ai.response.id*gen_ai.request.stream_cursor*error.typegen_ai.response.finish_reasonsgen_ai.response.modelgen_ai.response.statusserver.addressserver.portgen_ai.output.messagesgen_ai.system_instructions+1 more
- gen_ai.invoke_agent.clientclientDevelopmentDescribes GenAI agent invocation over a remote service.
gen_ai.provider.name*gen_ai.agent.description*gen_ai.agent.id*gen_ai.agent.version*gen_ai.conversation.id*gen_ai.data_source.id*gen_ai.output.type*gen_ai.request.choice.count*gen_ai.request.seed*error.typegen_ai.agent.namegen_ai.operation.name+32 more
- gen_ai.invoke_agent.internalinternalDevelopmentDescribes GenAI agent invocation within the same process.
gen_ai.agent.description*gen_ai.conversation.id*gen_ai.data_source.id*gen_ai.output.type*gen_ai.request.choice.count*gen_ai.request.seed*error.typegen_ai.agent.namegen_ai.operation.namegen_ai.request.frequency_penaltygen_ai.request.max_tokensgen_ai.request.model+15 more
- gen_ai.invoke_workflow.internalinternalDevelopmentRepresents an operation that executes a coordinated process composed of multiple agents or other operations involving ge
gen_ai.operation.name*gen_ai.conversation.id*gen_ai.workflow.name*error.typegen_ai.input.messagesgen_ai.output.messages
- gen_ai.memory.clientclientDevelopmentDescribes a memory operation, including memory store lifecycle operations and memory record operations.
gen_ai.operation.name*gen_ai.memory.record.id*gen_ai.memory.store.id*gen_ai.provider.name*error.typegen_ai.memory.record.countserver.addressserver.portgen_ai.memory.query.textgen_ai.memory.records
- gen_ai.plan.internalinternalDevelopmentRepresents an agent planning or task decomposition phase.
- gen_ai.retrieval.clientclientDevelopmentDescribes GenAI retrieval span - a request to a Generative AI service or framework that retrieves relevant information o
gen_ai.operation.name*gen_ai.data_source.id*gen_ai.provider.name*gen_ai.request.model*error.typegen_ai.retrieval.top_kserver.addressserver.portgen_ai.retrieval.documentsgen_ai.retrieval.query.text
- anthropic.inference.clientclientDeprecatedSemantic Conventions for Anthropic client spans extend and override the semantic conventions for Gen AI Spans.
error.type*server.port*gen_ai.conversation.idgen_ai.input.messagesgen_ai.operation.namegen_ai.output.messagesgen_ai.output.typegen_ai.request.choice.countgen_ai.request.frequency_penaltygen_ai.request.max_tokensgen_ai.request.modelgen_ai.request.presence_penalty+17 more
- gen_ai.embeddings.clientclientDeprecatedDescribes GenAI embeddings span - a request to a Generative AI model or service that generates an embeddings based on th
error.type*gen_ai.embeddings.dimension.countgen_ai.operation.namegen_ai.provider.namegen_ai.request.encoding_formatsgen_ai.request.modelgen_ai.response.modelgen_ai.usage.input_tokensserver.addressserver.port
- gen_ai.inference.clientclientDeprecatedThis span represents a client call to Generative AI model or service that generates a response or requests a tool call b
error.type*gen_ai.conversation.idgen_ai.input.messagesgen_ai.operation.namegen_ai.output.messagesgen_ai.output.typegen_ai.provider.namegen_ai.request.choice.countgen_ai.request.frequency_penaltygen_ai.request.max_tokensgen_ai.request.modelgen_ai.request.presence_penalty+19 more
- openai.inference.clientclientDeprecatedSemantic Conventions for OpenAI client spans extend and override the semantic conventions for Gen AI Spans.
error.type*gen_ai.conversation.idgen_ai.input.messagesgen_ai.operation.namegen_ai.output.messagesgen_ai.output.typegen_ai.request.choice.countgen_ai.request.frequency_penaltygen_ai.request.max_tokensgen_ai.request.modelgen_ai.request.presence_penaltygen_ai.request.seed+21 more
Events 8
- gen_ai.assistant.messageDeprecatedThis event describes the assistant message passed to GenAI system.
- gen_ai.choiceDeprecatedThis event describes the Gen AI response message.
- gen_ai.client.inference.operation.detailsDevelopmentDescribes the details of a GenAI completion request including chat history and parameters.
- gen_ai.client.operation.exceptionDevelopmentThis event represents an exception that occurred during a Generative AI client operation, such as API errors, rate limit
- gen_ai.evaluation.resultDevelopmentThis event captures the result of evaluating GenAI output for quality, accuracy, or other characteristics. This event SH
gen_ai.evaluation.name*error.type*gen_ai.evaluation.score.label*gen_ai.evaluation.score.value*gen_ai.evaluation.explanationgen_ai.response.id
- gen_ai.system.messageDeprecatedThis event describes the system instructions passed to the GenAI model.
- gen_ai.tool.messageDeprecatedThis event describes the response from a tool or function call passed to the GenAI model.
- gen_ai.user.messageDeprecatedThis event describes the user message passed to the GenAI model.
Metrics 24
- gen_ai.client.embeddings.durationDevelopmenthistogram · sGenAI client embeddings operation duration.
- gen_ai.client.embeddings.operation.input_tokensDevelopmenthistogram · {token}The number of input tokens used per embeddings operation.
- gen_ai.client.inference.durationDevelopmenthistogram · sGenAI client inference operation duration.
- gen_ai.client.inference.operation.input_tokensDevelopmenthistogram · {token}The number of input (prompt) tokens used per inference operation.
- gen_ai.client.inference.operation.output_tokensDevelopmenthistogram · {token}The number of output (completion) tokens used per inference operation.
- gen_ai.client.inference.time_per_output_chunkDevelopmenthistogram · 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_chunkDevelopmenthistogram · 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_tokensDevelopmentcounter · {token}The number of input tokens served from a provider-managed cache.
- gen_ai.client.inference.usage.cache_write.input_tokensDevelopmentcounter · {token}The number of input tokens written to a provider-managed cache.
- gen_ai.client.inference.usage.input_tokensDevelopmentcounter · {token}The number of input (prompt) tokens used, including cached tokens.
- gen_ai.client.inference.usage.output_tokensDevelopmentcounter · {token}The number of output (completion) tokens used, including reasoning tokens.
- gen_ai.client.inference.usage.reasoning.output_tokensDevelopmentcounter · {token}The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
- gen_ai.client.operation.durationDevelopmenthistogram · sGenAI operation duration.
- gen_ai.client.operation.time_per_output_chunkDeprecatedhistogram · 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_chunkDeprecatedhistogram · 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.usageDeprecatedhistogram · {token}Number of input and output tokens used.
- gen_ai.execute_tool.durationDevelopmenthistogram · sThe duration of a single tool execution.
- gen_ai.invoke_agent.durationDevelopmenthistogram · sThe end-to-end duration of a single in-process agent invocation, from the moment the invocation starts until the agent emits the last chunk
- gen_ai.invoke_agent.inference_callsDevelopmenthistogram · {inference_call}The number of inference (model) calls a GenAI agent makes during a single invocation.
- gen_ai.invoke_agent.tool_callsDevelopmenthistogram · {tool_call}The number of tool calls a GenAI agent makes during a single invocation.
- gen_ai.invoke_workflow.durationDevelopmenthistogram · sRecords duration of GenAI workflow.
- gen_ai.server.request.durationDevelopmenthistogram · sGenerative AI server request duration such as time-to-last byte or last output token.
- gen_ai.server.time_per_output_tokenDevelopmenthistogram · sTime per output token generated after the first token for successful responses.
- gen_ai.server.time_to_first_tokenDevelopmenthistogram · sTime to generate first token for successful responses.
Specification
- Spansare bound by the trace specification — 302 requirements across 7 documents, 168 of them MUST or SHALL.
- Metricsare bound by the metrics specification — 561 requirements across 8 documents, 287 of them MUST or SHALL.
- Eventsare bound by the logs specification — 162 requirements across 5 documents, 83 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 108
gen_ai97 attributes
- gen_ai.agent.descriptionDevelopmentGenAIFree-form description of the GenAI agent provided by the application.
- gen_ai.agent.idDevelopmentGenAIThe unique and stable identifier of the GenAI hosted agent resource.
- gen_ai.agent.nameDevelopmentGenAIHuman-readable name of the GenAI agent provided by the application.
- gen_ai.agent.versionDevelopmentGenAIThe version of the GenAI agent.
- gen_ai.completionDeprecatedDeprecated, use Event API to report completions contents.
- gen_ai.conversation.compactedDevelopmentGenAIIndicates whether the effective conversation context used for this operation is a compacted view of a prior conversation.
- gen_ai.conversation.idDevelopmentGenAIThe unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.
- gen_ai.data_source.idDevelopmentGenAIThe data source identifier.
- gen_ai.embeddings.dimension.countDevelopmentGenAIThe number of dimensions the resulting output embeddings should have.
- gen_ai.evaluation.explanationDevelopmentGenAIA free-form explanation for the assigned score provided by the evaluator.
- gen_ai.evaluation.nameDevelopmentGenAIThe name of the evaluation metric used for the GenAI response.
- gen_ai.evaluation.score.labelDevelopmentGenAIHuman readable label for evaluation.
- gen_ai.evaluation.score.valueDevelopmentGenAIThe evaluation score returned by the evaluator.
- gen_ai.input.messagesDevelopmentGenAIThe chat history provided to the model as an input.
- gen_ai.input.messages_refDevelopmentGenAIAn absolute URI identifying the input messages in external storage.
- gen_ai.main_agent.descriptionDevelopmentGenAIThe free-form description of the top-level Generative AI agent in the process.
- gen_ai.main_agent.idDevelopmentGenAIThe unique and stable identifier of the top-level Generative AI agent in the process
- gen_ai.main_agent.nameDevelopmentGenAIThe human-readable name of the top-level Generative AI agent in the process.
- gen_ai.memory.query.textDevelopmentGenAIThe search query used to retrieve memories.
- gen_ai.memory.record.countDevelopmentGenAIThe number of memory records relevant to the operation.
- gen_ai.memory.record.idDevelopmentGenAIThe unique identifier of the memory record.
- gen_ai.memory.recordsDevelopmentGenAIThe memory records stored or retrieved in a memory operation.
- gen_ai.memory.store.idDevelopmentGenAIThe unique identifier of the memory store.
- gen_ai.openai.request.response_formatDeprecatedDeprecated, use gen_ai.output.type.
- gen_ai.openai.request.seedDeprecatedDeprecated, use gen_ai.request.seed.
- gen_ai.openai.request.service_tierDeprecatedDeprecated, use openai.request.service_tier.
- gen_ai.openai.response.service_tierDeprecatedDeprecated, use openai.response.service_tier.
- gen_ai.openai.response.system_fingerprintDeprecatedDeprecated, use openai.response.system_fingerprint.
- gen_ai.operation.nameDevelopmentGenAIThe name of the operation being performed.
- gen_ai.output.messagesDevelopmentGenAIMessages returned by the model where each message represents a specific model response (choice, candidate).
- gen_ai.output.messages_refDevelopmentGenAIAn absolute URI identifying the output messages in external storage.
- gen_ai.output.typeDevelopmentGenAIRepresents the content type requested by the client.
- gen_ai.promptDeprecatedDeprecated, use Event API to report prompt contents.
- gen_ai.prompt.nameDevelopmentGenAIThe name of the prompt that uniquely identifies it.
- gen_ai.prompt.variableDevelopmentGenAIThe variables supplied to the prompt template, the <key> being the variable name, the value being the variable value.
- gen_ai.prompt.versionDevelopmentGenAIThe version of the prompt template used.
- gen_ai.provider.nameDevelopmentGenAIThe Generative AI provider as identified by the client or server instrumentation.
- gen_ai.request.choice.countDevelopmentGenAIThe target number of candidate completions to return.
- gen_ai.request.encoding_formatsDevelopmentGenAIThe encoding formats requested in an embeddings operation, if specified.
- gen_ai.request.frequency_penaltyDevelopmentGenAIThe frequency penalty setting for the GenAI request.
- gen_ai.request.max_tokensDevelopmentGenAIThe maximum number of tokens the model generates for a request.
- gen_ai.request.modelDevelopmentGenAIThe name of the GenAI model a request is being made to.
- gen_ai.request.presence_penaltyDevelopmentGenAIThe presence penalty setting for the GenAI request.
- gen_ai.request.previous_response.idDevelopmentGenAIThe unique identifier of a previous response or interaction used to provide context for the current operation.
- gen_ai.request.reasoning.levelDevelopmentGenAIThe reasoning or thinking effort level requested for a GenAI model.
- gen_ai.request.seedDevelopmentGenAIRequests with same seed value more likely to return same result.
- gen_ai.request.stop_sequencesDevelopmentGenAIList of sequences that the model will use to stop generating further tokens.
- gen_ai.request.streamDevelopmentGenAIIndicates whether the GenAI request was made in streaming mode.
- gen_ai.request.stream_cursorDevelopmentGenAIThe cursor identifying the last streamed event already received, used to resume a streamed response from that position.
- gen_ai.request.temperatureDevelopmentGenAIThe temperature setting for the GenAI request.
- gen_ai.request.top_kDevelopmentGenAIThe top-K sampling setting for the GenAI request: restricts token generation at each step to the K most likely next tokens.
- gen_ai.request.top_pDevelopmentGenAIThe top_p sampling setting for the GenAI request.
- gen_ai.response.finish_reasonsDevelopmentGenAIArray of reasons the model stopped generating tokens, corresponding to each generation received.
- gen_ai.response.idDevelopmentGenAIThe unique identifier for the completion.
- gen_ai.response.modelDevelopmentGenAIThe name of the model that generated the response.
- gen_ai.response.statusDevelopmentGenAIThe lifecycle status of a generated response, as reported by the provider when the response is fetched or polled.
- gen_ai.response.time_to_first_chunkDevelopmentGenAITime from the start of a logical inference operation to the first chunk in its streaming response, in seconds.
- gen_ai.retrieval.documentsDevelopmentGenAIThe documents retrieved.
- gen_ai.retrieval.query.textDevelopmentGenAIThe query text used for retrieval.
- gen_ai.retrieval.top_kDevelopmentGenAIThe maximum number of documents the retriever was asked to return for the query (also known as k, limit, or max_num_results).
- gen_ai.skill.descriptionDevelopmentGenAIThe description of the Agent Skill.
- gen_ai.skill.nameDevelopmentGenAIThe name of the Agent Skill.
- gen_ai.skill.resource.nameDevelopmentGenAIThe skill-relative name of the resource (script, reference, or asset) being accessed or executed.
- gen_ai.skill.source.uriDevelopmentGenAIThe source URI for loading the skill.
- gen_ai.systemDeprecatedDeprecated, use gen_ai.provider.name instead.
- gen_ai.system_instructionsDevelopmentGenAIThe system message or instructions provided to the GenAI model separately from the chat history.
- gen_ai.system_instructions_refDevelopmentGenAIAn absolute URI identifying the system instructions in external storage.
- gen_ai.token.modalityDevelopmentGenAIThe modality of the tokens being counted.
- gen_ai.token.typeDeprecatedThe type of token being counted.
- gen_ai.tool.call.argumentsDevelopmentGenAIParameters passed to the tool call.
- gen_ai.tool.call.idDevelopmentGenAIThe tool call identifier supplied by the model or provider.
- gen_ai.tool.call.resultDevelopmentGenAIThe result returned by the tool call (if any and if execution was successful).
- gen_ai.tool.definitionsDevelopmentGenAIThe list of tool definitions available to the GenAI agent or model.
- gen_ai.tool.definitions_refDevelopmentGenAIAn absolute URI identifying the tool definitions in external storage.
- gen_ai.tool.descriptionDevelopmentGenAIThe tool description.
- gen_ai.tool.nameDevelopmentGenAIName of the tool utilized by the agent.
- gen_ai.tool.typeDevelopmentGenAIType of the tool utilized by the agent
- gen_ai.transfer.modeDevelopmentGenAIDescribes how control passes to the transfer target.
- gen_ai.transfer.target.nameDevelopmentGenAIThe human-readable name of the agent targeted by the transfer.
- gen_ai.usage.audio.cache_read.input_tokensDevelopmentGenAIThe number of audio input tokens served from a provider-managed cache.
- gen_ai.usage.audio.input_tokensDevelopmentGenAIThe number of audio input tokens.
- gen_ai.usage.audio.output_tokensDevelopmentGenAIThe number of audio output tokens.
- gen_ai.usage.cache_creation.input_tokensDeprecatedThe number of input tokens written to a provider-managed cache.
- gen_ai.usage.cache_read.input_tokensDevelopmentGenAIThe number of input tokens served from a provider-managed cache.
- gen_ai.usage.cache_write.input_tokensDevelopmentGenAIThe number of input tokens written to a provider-managed cache.
- gen_ai.usage.completion_tokensDeprecatedDeprecated, use gen_ai.usage.output_tokens instead.
- gen_ai.usage.image.cache_read.input_tokensDevelopmentGenAIThe number of image input tokens served from a provider-managed cache.
- gen_ai.usage.image.input_tokensDevelopmentGenAIThe number of image input tokens.
- gen_ai.usage.image.output_tokensDevelopmentGenAIThe number of image output tokens.
- gen_ai.usage.input_tokensDevelopmentGenAIThe number of tokens used in the GenAI input (prompt).
- gen_ai.usage.output_tokensDevelopmentGenAIThe number of tokens used in the GenAI response (completion).
- gen_ai.usage.prompt_tokensDeprecatedDeprecated, use gen_ai.usage.input_tokens instead.
- gen_ai.usage.reasoning.output_tokensDevelopmentGenAIThe number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
- gen_ai.usage.text.cache_read.input_tokensDevelopmentGenAIThe number of text input tokens served from a provider-managed cache.
- gen_ai.usage.text.input_tokensDevelopmentGenAIThe number of text input tokens.
- gen_ai.usage.text.output_tokensDevelopmentGenAIThe number of text output tokens.
- gen_ai.workflow.nameDevelopmentGenAIHuman-readable name of the GenAI workflow provided by the application.
a2a7 attributes
- a2a.message.idDevelopmentGenAIThe unique identifier of the A2A message.
- a2a.message.reference_task_idsDevelopmentGenAITask IDs referenced by the A2A request message.
- a2a.method.nameDevelopmentGenAIThe name of the A2A request method.
- a2a.protocol.versionDevelopmentGenAIThe version of the A2A protocol used.
- a2a.task.idDevelopmentGenAIThe unique identifier of an A2A task.
- a2a.task.stateDevelopmentGenAIThe state of an A2A task.
- a2a.tenantDevelopmentGenAIThe opaque routing identifier of the target A2A tenant.
openai4 attributes
- openai.api.typeDevelopmentGenAIThe type of OpenAI API being used.
- openai.request.service_tierDevelopmentGenAIThe service tier requested. May be a specific tier, default, or auto.
- openai.response.service_tierDevelopmentGenAIThe service tier used for the response.
- openai.response.system_fingerprintDevelopmentGenAIA fingerprint to track any eventual change in the Generative AI environment.
Recent changes
Breaking and notable changes to this domain across the last 6 semantic-conventions releases.
- deprecatedattributegen_ai.agent.descriptionMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedattributegen_ai.agent.idMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedattributegen_ai.agent.nameMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedattributegen_ai.agent.versionMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedmetricgen_ai.client.operation.durationMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedmetricgen_ai.client.operation.time_per_output_chunkMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedmetricgen_ai.client.operation.time_to_first_chunkMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedmetricgen_ai.client.token.usageMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedattributegen_ai.conversation.idMoved to the OpenTelemetry GenAI semantic conventions repository.
- deprecatedattributegen_ai.data_source.idMoved to the OpenTelemetry GenAI semantic conventions repository.
Topics are this site's grouping of upstream namespaces, not a structure the OpenTelemetry project publishes. JSON · All domains