Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

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.

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_type sets the kind, and inputs, output, llm.response.model and llm.usage.* set the input, output, model and tokens.
  • Langflow (scope langflow): trace_type sets the kind, and inputs and outputs set 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): the lk.pii.* keys set the content, and a host in the provider names the endpoint.
  • Pipecat (scopes starting with pipecat): input and output set the content, and conversation.id sets the session on the turn spans.
  • Promptfoo (scope promptfoo.providers): gen_ai.evaluation.name marks a grader span as an evaluator.
  • OpenLIT (scopes starting with openlit.instrumentation.): gen_ai.operation.type sets the kind when the operation name is not a standard one, and on a vector span db.operation.name marks 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.

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:

  1. cetra
  2. OpenTelemetry GenAI
  3. VoltAgent
  4. OpenInference
  5. Vercel AI SDK
  6. OpenLLMetry
  7. Langfuse
  8. Laminar
  9. Google ADK

The winner takes the whole field. cetra never merges the message lists of two conventions into one.

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 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.