Skip to content

Span attribute inventory

Complete inventory of gen_ai.* and related span attributes consumed by Coralogix AI Center. Use this reference when instrumenting manually or when verifying that spans from your instrumentation library carry the attributes AI Center expects.

How OTEL GenAI semantic conventions work

Every LLM call generates a span representing the request-response lifecycle. The span carries attributes (key-value metadata) that describe what happened:
ConceptExample
Providergen_ai.provider.name = "openai"
Modelgen_ai.request.model = "gpt-4o"
Inputgen_ai.input.messages = [{"role": "user", "parts": [{"type": "text", "content": "Hello"}]}]
Outputgen_ai.output.messages = [{"role": "assistant", "parts": [{"type": "text", "content": "Hi!"}]}]
Token usagegen_ai.usage.input_tokens = 12, gen_ai.usage.output_tokens = 8
Operationgen_ai.operation.name = "chat"

Span attributes

AttributeTypeDescription
gen_ai.provider.namestringLLM provider name (for example, openai, anthropic)
gen_ai.request.modelstringModel name requested (for example, gpt-4o)
gen_ai.response.modelstringModel name in response (may differ from request)
gen_ai.request.temperaturenumberTemperature parameter
gen_ai.usage.input_tokensnumberInput token count
gen_ai.usage.output_tokensnumberOutput token count
gen_ai.input.messagesJSON arrayAll input messages as JSON parts array
gen_ai.output.messagesJSON arrayAll output messages as JSON parts array
gen_ai.response.finish_reasonsJSON arrayArray of finish reasons
gen_ai.request.toolsJSON arrayTool definitions in request
gen_ai.tool.definitionsJSON arrayTool definitions (alternative key)
gen_ai.tool.namestringTool name (on tool-call child spans)
gen_ai.operation.namestringOperation type ("chat", "text_completion", or "embeddings")
gen_ai.system_instructionsstringSystem instructions sent with the request

User identity resolution

AI Center resolves user identity from multiple tag keys (checked in order via firstNonNull()):
AttributeSource
gen_ai.request.userOTel semconv
enduser.idOTel semconv
user.idOTel semconv
traceloop.association.properties.user_idOpenLLMetry
langsmith.metadata.user_idLangSmith

Next steps

Look up which open-source library to use for your provider in Provider compatibility.