Skip to content

GenAI semantic conventions: the pinned version

CredenceStack's spans follow the OpenTelemetry GenAI semantic conventions. They have Development status: names may still change in later versions, and CredenceStack will follow them in a later release.

What was pinned, and how

Item Value
Attribute registry checked opentelemetry-semantic-conventions 0.66b2 (Python), the gen_ai_attributes registry it ships
Schema URL on CredenceStack's tracer https://opentelemetry.io/schemas/1.44.0 (the newest that package lists)
Minimum convention version targeted 1.37 attribute names (for example gen_ai.provider.name, not the older gen_ai.system), which Datadog's Agent Observability requires
GenAI repository commit Not recorded: see TODO-verify below
SDK used opentelemetry-sdk and the OTLP exporters 1.45.2

In mid-2026 the GenAI conventions moved out of the core semantic-conventions repository into open-telemetry/semantic-conventions-genai. The 0.66b2 package still lists every GenAI attribute, each marked "moved to the OpenTelemetry GenAI semantic conventions repository". That registry is what the names in credencestack/otel/semconv.py were checked against, one by one.

This build ran offline: network use was limited to installing packages. The GenAI repository's span documents (agent spans, model spans) were therefore not read. What the package does not contain is marked TODO-verify, in the code and in the register.

Confirmed against the pinned registry

Operation names (GenAiOperationNameValues): invoke_agent, execute_tool, chat.

Attributes: gen_ai.operation.name, gen_ai.provider.name, gen_ai.agent.name, gen_ai.agent.id, gen_ai.conversation.id, gen_ai.request.model, gen_ai.response.model, gen_ai.response.finish_reasons, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, gen_ai.tool.name, gen_ai.tool.call.id, gen_ai.tool.type, gen_ai.tool.description, gen_ai.input.messages, gen_ai.output.messages, gen_ai.tool.call.arguments, gen_ai.tool.call.result, gen_ai.evaluation.name, gen_ai.evaluation.score.value, gen_ai.evaluation.score.label; and error.type, service.name, service.version, deployment.environment.name from the general registry.

Provider values used when a model id names its provider (GenAiProviderNameValues): anthropic, openai, azure.ai.openai, aws.bedrock, gcp.gen_ai, gcp.vertex_ai, gcp.gemini, mistral_ai, groq, cohere, deepseek.

Not in the package: TODO-verify

Item What CredenceStack does Check against
Span name formats invoke_agent {gen_ai.agent.name}, execute_tool {gen_ai.tool.name}, {gen_ai.operation.name} {gen_ai.request.model} The GenAI agent-spans and model-spans documents
Span kinds invoke_agent: INTERNAL in process, CLIENT for the HTTP and MCP connectors; execute_tool: INTERNAL; chat: CLIENT Same
Requirement levels gen_ai.provider.name is set only when the model id names a provider; it is never guessed Same (the conventions may require it on chat)
gen_ai.tool.type values function The attribute registry's value list
Message JSON shape [{"role": ..., "parts": [{"type": "text", "content": ...}]}] for gen_ai.input.messages and gen_ai.output.messages The GenAI input/output messages JSON schema
Evaluation event gen_ai.evaluation.result on the grade span The GenAI events document

MCP

The MCP Python SDK installed here (2.3) propagates W3C Trace Context through the request _meta field (mcp/shared/_otel.py: inject_trace_context and extract_trace_context). CredenceStack relies on that SDK behaviour and on the TRACEPARENT environment variable; the MCP semantic-conventions document itself was not read.