opentelemetry-python-genai This Week: Realtime Events and Attribute Type Fixes
I looked at the last week of commits in opentelemetry-python-genai, the OpenTelemetry project that instruments GenAI libraries in Python. 25 commits landed, touching 434 files. The headline items are realtime and speech event support in opentelemetry-util-genai, a new agno instrumentation, and a round of fixes so request attributes land with the right types in backends.
Realtime, speech and session events in util-genai
The biggest functional change is the realtime inference, user speech and session event support in opentelemetry-util-genai (#1087). Until now the util covered text style chat and agent flows. With this merge, apps using realtime voice APIs can emit events for user speech and session lifecycle alongside the usual gen_ai attributes.
If you build dashboards over these events, expect new event names to appear in your ingest. Worth filtering on before they flood a production view.
Two new instrumentations: agno and QwenPaw 2.x
Coverage keeps widening. The agno model call instrumentation (#773) adds a new package, opentelemetry-instrumentation-genai-agno, that emits spans for agno model calls. It ships with its own conformance tests under the instrumentation directory.
On the runtime side, QwenPaw 2.x runtime support (#994) upgrades the qwenpaw instrumentation to the 2.x runtime, with example requirements updated in both the manual and zero-code variants. Also useful: the Claude Agent SDK now emits invoke_agent spans for query(), so agent level spans show up without extra wiring.
Attribute type cleanup that saves backend pain
Several fixes address attributes recorded with the wrong type. Backends that validate against the GenAI semantic conventions reject or coerce these, so the fixes matter if you query on numeric attributes.
- Record
gen_ai.request.top_kas an int in google-genai (#1154) - Record Converse temperature and top_p as doubles in bedrock (#1153)
- Omit zero cache tokens on remote agent invocation spans in util-genai
Another user visible repair: the anthropic instrumentation now restores caller context while a stream is unconsumed (#943). If you stream and noticed spans missing caller context or attributes bleeding between calls, this one is for you. There is also a fix for LangChain chat token usage fallbacks (#1163) that makes token counts more reliable when usage fields are missing from responses.
SDK and tooling upgrade, and a simpler conformance setup
The maintainers also merged the upgrade to OpenTelemetry Python 1.46.0 / 0.67b0 and Weaver 0.29.0 (#1175). A few details from that commit worth noting:
- The declarative configuration examples moved to
file_format: "1.2", and the OTLP exporter key changed tootlp_http dev-requirements-conformance.txtdropped its long list of git pinned packages; the core stack now comes fromopentelemetry-test-util-genaion PyPI- Imports moved from
opentelemetry.sdk._logsto the publicopentelemetry.sdk.logspath
On top of that, Modality and Role moved to StrEnum in the public API change (#1167), and renovate kept langchain-anthropic at v1.8.0, anthropic at >=2.14.0 and a batch of patch versions current.
What to watch
- The StrEnum change to
ModalityandRolewent through the public API check. If you compare these values as plain strings, verify your code still matches after upgrading. - The declarative config examples now require file format 1.2. Older config files using
otlpwithprotocol: http/protobufwill not match; switch tootlp_http. - Expect follow up work around the realtime and speech events as they settle, plus more providers adopting the corrected attribute types.
Where to read more: the repo on GitHub and its changelog.