-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add telemetry success field #42846
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?
Add telemetry success field #42846
Conversation
…into add-telemetry-success-field
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 telemetry success tracking for dropped items in the Azure Monitor OpenTelemetry exporter, implementing a new telemetry_success
field as specified in the Telemetry Collection Spec. The implementation extracts success flags from RequestData and RemoteDependencyData envelopes and includes them in dropped item metrics.
Key Changes
- Enhanced dropped item tracking to include telemetry success status for REQUEST and DEPENDENCY types
- Updated data structures to support nested success tracking in counters
- Added comprehensive test coverage for both successful and failed telemetry scenarios
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
_utils.py |
Added helper function to extract success flags from telemetry envelopes and updated tracking calls |
_customer_sdkstats.py |
Modified data structures and methods to support telemetry success tracking with nested dictionaries |
test_base_customer_sdkstats.py |
Added new test cases for CLIENT_EXCEPTION scenarios with both success and failure cases |
test_customer_sdkstats.py |
Enhanced existing integration test to verify telemetry success categorization |
...-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/_customer_sdkstats.py
Outdated
Show resolved
Hide resolved
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/statsbeat/test_customer_sdkstats.py
Show resolved
Hide resolved
…into add-telemetry-success-field
success_key = None | ||
|
||
current_count = success_map.get(success_key, 0) | ||
success_map[success_key] = current_count + count |
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.
I don't think we can have success_key
= None
as a key. We probably need a dual typing for reason_map[reason]
depending on what type of telemetry it is. Should it should be a number for non-request/dep type telemetry and a dictionary for request/dep? Either that, or we can just default all non-req/dep type telemetrry to True
for success and we can put all counts under that bucket.
Description
Added
telemetry_success
field to dropped items as per spec - https://github.com/aep-health-and-standards/Telemetry-Collection-Spec/pull/606All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines