GenAI Semantic Conventions Export
Experimental. OPENINFERENCE_ENABLE_GENAI_SEMCONV (bool, default false; Python TraceConfig(enable_genai_semconv=True), JavaScript traceConfig: { enableGenAISemconv: true })
makes an instrumentation also emit OTel GenAI gen_ai.*
attributes, derived at span end from the span’s OpenInference attributes.
- Existing
gen_ai.*attributes MUST NOT be overwritten. - Derivation runs after data masking, so hidden content stays hidden.
- The mapping is defined by the Python reference,
_genai_conversion.py.
Status
| Language | Flag | Weaver conformance |
|---|---|---|
| Python | ✅ | ✅ Anthropic, OpenAI, Google GenAI |
| JavaScript | ✅ spans created through OITracer (@arizeai/openinference-core) |
🗓️ #3114 |
| Java | 🗓️ #2983 | 🗓️ #3114 |
| Go | 🗓️ #2983 | 🗓️ #3114 |
🗓️ = planned; the flag is ignored.
Conformance
uv run python/openinference-instrumentation/scripts/conformance/run.py
Runs each provider against a mock server with the flag on and checks the spans with Weaver registry live-check
against the GenAI semconv registry. Non-registry OpenInference attributes are expected; only gen_ai.* is judged.
See the harness README.
New language implementations SHOULD add an equivalent harness.