Semantic conventions
Read this page to learn which instrumentation libraries cetra understands, and how it picks a value when a span carries more than one convention.
Instrumentation libraries describe an LLM call with attributes, and they do not all use the same names. A convention is a naming scheme for those attributes. cetra reads the common ones, so the same field, such as the model or the input tokens, appears in the same place in the UI whatever sent the span.
The conventions cetra reads
Section titled “The conventions cetra reads”| Convention | cetra recognizes it by | What cetra reads |
|---|---|---|
| cetra | any attribute starting with cetra. |
Kind, input, output, session, user, tags, metadata, environment, release, time to first token, cost |
| OpenTelemetry GenAI | gen_ai.* attributes, or events named gen_ai.* |
Operation, models, provider, messages, system instructions, tool definitions, token counts, finish reasons, conversation ID |
| VoltAgent | voltagent.* attributes, or an instrumentation scope starting with @voltagent/ |
Span kind, model, input and output, token counts, session |
| OpenInference | openinference.span.kind, or llm.*, input.value, output.value, embedding.*, retrieval.*, tool.* |
Kind, models, input and output messages, tool definitions, token counts, cost, session, user |
| Vercel AI SDK | ai.* attributes |
Operation, models, prompt, response, tool calls, token counts, telemetry metadata |
| OpenLLMetry | traceloop.*, or gen_ai.prompt.N.* and gen_ai.completion.N.* |
Kind, prompt and completion messages, entity input and output, association properties |
| Langfuse | langfuse.* attributes |
Observation type, input, output, model, usage, cost, session, user, tags, metadata |
| Laminar | lmnr.* attributes |
Span type, input, output, association properties |
| Google ADK | gcp.vertex.agent.* attributes |
Request, response, tool calls, session |
Span attributes lists every attribute and the field it feeds.
Bifrost writes the GenAI convention under the instrumentation scope bifrost; cetra reads its server root span as a chain, and reads its tool calls and cost keys (bifrost.cost.*).
Some frameworks write their own keys under their instrumentation scope. cetra reads those keys only on that scope, so the same key on another scope is left as it is:
- Prompt Flow (scope
promptflow):span_typesets the kind, andinputs,output,llm.response.modelandllm.usage.*set the input, output, model and tokens. - Langflow (scope
langflow):trace_typesets the kind, andinputsandoutputsset the input and output. - n8n (scope
n8n-workflow): the span name sets the kind, unless a GenAI operation sets it. - LiveKit Agents (scope
livekit-agents): thelk.pii.*keys set the content, and a host in the provider names the endpoint. - Pipecat (scopes starting with
pipecat):inputandoutputset the content, andconversation.idsets the session on the turn spans. - Promptfoo (scope
promptfoo.providers):gen_ai.evaluation.namemarks a grader span as an evaluator. - OpenLIT (scopes starting with
openlit.instrumentation.):gen_ai.operation.typesets the kind when the operation name is not a standard one, and on a vector spandb.operation.namemarks the reads as retrievers. - Vector databases: OpenLLMetry’s Chroma, Qdrant, Milvus, Pinecone and Weaviate instrumentors (scopes
opentelemetry.instrumentation.chromadb,.qdrant,.milvus,.pinecone,.weaviate) set the kind by span name, and the read names are retrievers.
Precedence
Section titled “Precedence”A span can carry several conventions. The Vercel AI SDK, for example, writes both ai.* and gen_ai.* attributes. For each field, cetra reads the conventions in this order and uses the first that has a value:
- cetra
- OpenTelemetry GenAI
- VoltAgent
- OpenInference
- Vercel AI SDK
- OpenLLMetry
- Langfuse
- Laminar
- Google ADK
The winner takes the whole field. cetra never merges the message lists of two conventions into one.
Attributes cetra does not use
Section titled “Attributes cetra does not use”cetra keeps every attribute it does not read for a field. They are stored on the span and shown in the UI under Attributes, and you can filter on them with attributes['key']. An attribute that cetra reads for a field is removed from the attributes once it is stored, unless its value is short, so large payloads are not stored twice.
If a payload cannot be read
Section titled “If a payload cannot be read”If cetra recognizes a convention but cannot convert its input or output into messages, it keeps the raw value and adds a cetra.normalize_error attribute to the span. The span is still stored.