Your LLM Traces Have a Spec Now — Here's a Way to Check Them Against It
If you've instrumented an LLM call with OpenTelemetry recently, you've probably typed gen_ai.request.model or gen_ai.usage.input_tokens into a span attribute and moved on, trusting you got the name right. There's an actual spec behind those attributes now — the GenAI semantic conventions, recently split out into their own dedicated repository — and it's still explicitly marked Development stability, meaning attribute names, types, and requirement levels are genuinely still moving. That's a different kind of instability than, say, the HTTP or database conventions, which have been settled for years.
A few things stood out once I read the actual registry instead of a summary blog post. gen_ai.provider.name is deliberately open-ended — new providers get added regularly, so an unrecognized value there isn't wrong, just unlisted. But gen_ai.response.status is a small, closed, fixed set (queued, in_progress, completed, incomplete, failed, cancelled) — a "done" or "success" there is a real mismatch, not a stylistic choice. Each span type has its own expected name template too: an inference span should be named {operation} {model} (e.g. chat gpt-4o), an execute_tool span should be execute_tool {tool_name} — easy to get subtly wrong if you're hand-rolling the instrumentation rather than using an SDK that already does it for you. And invoke_agent spans have two different required-attribute sets depending on whether the call crossed a network boundary or stayed in-process, which the spec ties to the span's own kind field.
The only real conformance checker that exists is Weaver, a Rust CLI OTel itself uses in CI against a live registry checkout — genuinely useful if you're building a collector or an instrumentation library, overkill if you just want to know whether the span your app just emitted is shaped correctly.
So: paste a span — a real OTLP JSON export with an attributes array, a full resourceSpans trace dump, or just a flattened object of gen_ai.* key/value pairs if you're testing by hand — and get every attribute checked for type and enum correctness, the operation-specific required fields verified, and the span name checked against its documented template.
Free, runs entirely in your browser, nothing you paste leaves your machine: bracketly.pages.dev/tools/otel-genai-span-validator
Top comments (0)