Skip to content

Python: Feature: Realtime SDK: Reporting Token Usage data to OTEL #12019

@adrianwright

Description

@adrianwright

Describe the bug
Using the realtime sdk, we do not see token usage or model name data included in the data sent to OTEL providers

To Reproduce
Implement realtime conversations using the Realtime SDK. Configure export of traces to OTEL destination of your choice (e.g. OTLPSpanExporter, AzureMonitorTraceExporter, or ConsoleSpanExporter

Expected behavior
Model name and token usage data is included in the OTEL trace data.

Screenshots
No token/model name data:
Image

For comparison, traces from chat completion includes model name, token usage and other data.
Image

Platform

  • Language: Python
  • Source:
  • AI model: OpenAI:GPT-4o-mini(2024-07-18)
  • IDE: VS Code
  • OS: App runs in a linux container

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic KernelstaleIssue is stale because it has been open for a while and has no activity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions