-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add Operation Name Propagation for Dependencies and Logs #43588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds operation name propagation for dependency and log telemetry in the Azure Monitor OpenTelemetry exporter. The operation name is now included in the AI_OPERATION_NAME tag for non-server spans (dependencies) and log records, improving telemetry correlation and observability.
Key Changes:
- Operation names are now propagated to dependency telemetry (RemoteDependencyData) and log telemetry (MessageData)
- HTTP dependencies use a specific format combining HTTP method and route/path
- Non-HTTP dependencies use the span name as the operation name
- Log records extract operation name from their attributes
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py |
Implements operation name propagation for dependency telemetry using span attributes |
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py |
Adds operation name extraction from log record attributes |
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/trace/test_trace.py |
Adds test assertions to verify operation name is set correctly for various dependency types |
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/logs/test_logs.py |
Updates test fixtures and adds assertions to verify operation name propagation in logs |
sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md |
Documents the new feature |
...onitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py
Outdated
Show resolved
Hide resolved
...monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
Outdated
Show resolved
Hide resolved
...monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Addresses - #34655
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines