Zenaique

Which OpenTelemetry GenAI attribute records the provider that served a call?

Flashcard·Easy·4.0 · 0·~30s·Asked atKrutrimReliance JioRunway
Attempt it
TL;DR

gen_ai.system. It is a stable, low-cardinality string naming the provider (openai, anthropic, bedrock) for each span.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine you order food from different restaurants through a delivery app. Each order has a label showing which restaurant cooked it: Pizza Place, Sushi Spot, Burger Joint. That label is the same idea as gen_ai.system. It does not say which specific dish you ordered or how much it cost. It just says which kitchen served you. Knowing the kitchen matters because each one has different prices, different cooking times, and different rules. If you later notice all the slow orders came from the same kitchen, you can spot the pattern. OpenTelemetry uses the same trick for model calls. One small label on every span tells you which provider answered, separately from which specific model was used or how many tokens were burned.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Recognizing gen_ai.system is the entry point into the OpenTelemetry GenAI semantic conventions. It is one of the first attributes any auto-instrumentation library sets, and it is the field most dashboards group by when comparing across providers.

The value of getting this question right is not the trivia. It is that knowing where the provider identity lives forces you to internalize the rest of the namespace structure: request, response, usage, operation. From there, every other attribute is a one-line spec lookup.

What gen_ai.system actually is

The OpenTelemetry GenAI conventions define gen_ai.system as a string attribute identifying the provider serving the model. The spec lists canonical values: openai, anthropic, vertex_ai, bedrock, azure_openai, cohere, mistral_ai, ibm_watsonx_ai, and a few more.

The value is set once per span, at the point where the auto-instrumentation library knows which provider client it wrapped. For manually instrumented calls, you set it yourself, typically in a shared helper that wraps your LLM SDK calls.

The attribute is in the stable tier of the spec, which means a future SDK upgrade will not rename it or change its semantics in a backward-incompatible way. Dashboards pinned to it are safe to keep.

Why it is separate from gen_ai.request.model
Low cardinality is a deliberate constraint
How it interacts with the rest of the span
The edge cases worth knowing
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Langfuse 3.x indexes gen_ai.system as a filter facet in the trace search UI.
  • OpenLLMetry sets gen_ai.system automatically based on which provider client the auto-instrumentation wrapped.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhy is gen_ai.system kept as a separate attribute when the model id already implies the provider?
A

Talk about model-id reuse across providers, low cardinality, and dashboard group-by semantics.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Confusing gen_ai.system with the model id. The system is the provider (openai); the model is the specific snapshot (gpt-4o-2024-08-06).

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Name the attribute that identifies the provider on an OTel GenAI span

  • Distinguish gen_ai.system from gen_ai.request.model

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Describe how end user thumbs up/down should flow back onto a trace
Flashcard·Easy