Populate measurements on telemetry from the microsoft.custom_measurements attribute - #48750
Populate measurements on telemetry from the microsoft.custom_measurements attribute#48750Radhika Gupta (rads-1996) wants to merge 5 commits into
microsoft.custom_measurements attribute#48750Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds support for mapping microsoft.custom_measurements attributes into Azure Monitor telemetry measurements.
Changes:
- Parses and validates custom measurements.
- Applies measurements to trace and log telemetry.
- Adds coverage and changelog documentation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
CHANGELOG.md |
Documents the feature. |
_constants.py |
Defines the reserved attribute name. |
_utils.py |
Parses and filters measurements. |
export/trace/_exporter.py |
Adds measurements to trace telemetry. |
export/logs/_exporter.py |
Adds measurements to log telemetry. |
tests/test_utils.py |
Tests parsing and validation. |
tests/trace/test_trace.py |
Tests trace conversion. |
tests/logs/test_logs.py |
Tests log conversion. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
1c21042 to
416017a
Compare
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
416017a to
8db9e15
Compare
| ## 1.0.0b57 (Unreleased) | ||
|
|
||
| ### Features Added | ||
| - Populate `measurements` on telemetry from the `microsoft.custom_measurements` attribute |
There was a problem hiding this comment.
We should add some sample code in the exporter project sending these, so customers only relying on this one can get some information about it
| return processed_measurements | ||
| if not isinstance(value, Mapping): | ||
| return processed_measurements | ||
| for key, val in value.items(): |
There was a problem hiding this comment.
Are measurements always key value pairs?, I thought we had some serialization in place for those here in azure sdk core dependency, not sure if that can be used, but it would be good to understand that part
Description
This PR implements the spec - https://github.com/aep-health-and-standards/Telemetry-Collection-Spec/pull/887
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines