How it works
The conventions name a span for a model call or a tool call in a way any compatible backend can read. gen_ai.operation.name says which operation ran. gen_ai.request.model says which model was requested. gen_ai.usage.input_tokens and gen_ai.usage.output_tokens carry the counts the emitter recorded. Pin the convention version you emit. The names still move, and a backend can only group attributes it was told to expect. Do not grow a private attribute catalogue and call the result the convention.
A claims assistant reads a short note and fills incident date, registration, and whether anyone was injured. The model span carries gen_ai.operation.name and gen_ai.request.model. The tool span that writes the three fields is a different span, not a copy of the model call. Token attributes are counts. They become money only after a price from a pricing page is applied, and that price is not part of the convention.
A worked example
Two spans on one claim note
Claim note, as the handler wrote it: a minor shunt, with the date, the registration, and a line that no one was injured.
Model span
gen_ai.operation.name: the generation that reads this note
gen_ai.request.model: the model the caller requested
gen_ai.usage.input_tokens: 640
gen_ai.usage.output_tokens: 90
Tool span
a separate span for the tool that writes incident date, registration, and injury flag
The convention version is the one this service pinned, so a later reader can see which names were agreed. The spans do not say whether the handler accepted the claim. That outcome sits on the conversation, not as another invented attribute.
Illustrative example, not a production trace and not a measured result.
What goes wrong
- Two services emit different drafts and the dashboard treats the names as one schema. gen_ai.request.model is set in one service and absent in the other, so the model split is quietly wrong.
- A vendor extra is treated as part of the convention. A move to another backend drops that extra, and a report that depended on it goes blank with no pinned version to explain the gap.
- Token counts from the model span are copied onto the tool span. The tool then looks as if it spent the tokens, and the input and output totals are double counted.
How to measure it
Record the convention version beside the service that emits it, and review that pin when you upgrade the SDK or the collector. Check that gen_ai.operation.name, gen_ai.request.model, gen_ai.usage.input_tokens, and gen_ai.usage.output_tokens appear on the spans where you expect them.
Sample a model span and a tool span from the same run and confirm they are different spans. Do not add a private attribute catalogue on top and then call the result the convention. Keep the task outcome outside these names.
Further reading
How Abracadabra helps
The convention names the model call and the tool call. It does not name the claim outcome. Keep that outcome on the conversation and join it back to the run you already trace.
A trace says the run finished. Abracadabra says whether the person got the job they came to do, and keeps that outcome on the conversation. It complements tracing and OpenTelemetry. It does not ingest spans or replace a trace tool.
Request access to read this on your own agent.