Convert numeric telemetry parameters to measurements for better analytics #51071
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Changes
This PR converts numeric telemetry parameters in
RunTelemetry.TrackRunEventfrom string properties to numeric measurements, enabling easier numeric comparisons and aggregations on the backend. Thanks to @DamianEdwards for seeing this!Risk
Low - just changes telemetry upload patterns
Testing
tests that verify the data is flowing through the telemetry system were updated
Copilot details
What changed
The following parameters are now sent as measurements (doubles) instead of properties (strings):
sdk_countpackage_reference_countproject_reference_countadditional_properties_count(file-based apps only)Why
Telemetry measurements are specifically designed for numeric data and enable the backend analytics system to perform:
sdk_count > 1)Previously, these values were stored as string properties, which required string-to-number conversion on the backend and limited the types of analysis that could be performed efficiently.
Example
Before:
After:
Testing
All existing tests have been updated to verify that numeric values are now sent in the measurements dictionary instead of the properties dictionary. All 11 RunTelemetry tests pass successfully.
Fixes #<issue_number>
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the
docs.