You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support more OpenTelemetry GenAI span attributes and events #356
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
[Problem]
Currently, ADK use OpenTelemetry to send tracing telemetry data to monitoring service.
But the information currently sent is limited and does not follow theOpenTelemetry Semantics.
For example, on Cloud Trace, it is shown that it is a GenAI span, but the number of input/output tokens is not shown.
Also, the current discussion in OpenTelemetry is moving towards sending each message and choice as an event, so we should align with that.
Support OpenTelemetry GenAI Span Attributes and Events.
Additional context
As a separate discussion, ADK is currently using CloudTraceSpanExporter, but the Cloud Trace API has strict limitations on the amount of data that can be sent, making it unsuitable for use with GenAI. I think it would be better to change this to use the OpenTelemetry Protocol (OTLP), but that's a separate issue.
Reacted by Marco Bertani-Økland, Harvey Cheng, aaron.pj.chen, Aaron Abbott, Sam Hatfield and sunny
changed the title [-]Support more OpenTelemetry GenAI span attributes and evnets[/-][+]Support more OpenTelemetry GenAI span attributes and events[/+]on Aug 11, 2025
Activity
mbertani commentedon May 15, 2025
Supporting the request of this needed functionality. It's unwise to go to production without cost visibility.
mbertani commentedon May 31, 2025
Any updates on this case? It would make a huge difference for my project to have this working properly :)
feat: add usage span attributes to telemetry (#356)
feat: add usage span attributes to telemetry (google#356)
feat: add usage span attributes to telemetry (google#356)
feat: add usage span attributes to telemetry (google#356)
[-]Support more OpenTelemetry GenAI span attributes and evnets[/-][+]Support more OpenTelemetry GenAI span attributes and events[/+]Jacksunwei commentedon Aug 11, 2025
There are quite a few changes related to this issue. We've finished all the changes following genai convention as much as we know. E.g. in https://github.com/google/adk-python/blob/main/src/google/adk/telemetry.py#L124-L128
I'll close this issue now, and feel free to open new issue if you see any missing parts.
feat(samples): refine hello_doctor sample and address review comments (…
feat(samples): refine hello_doctor sample and address review comments (…
feat(samples): refine hello_doctor sample and address review comments (…
Joong-Sunny commentedon Mar 10, 2026
link is not valid
feat: add usage span attributes to telemetry (google#356)