Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 30, 2025

Changes

This PR converts numeric telemetry parameters in RunTelemetry.TrackRunEvent from 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_count
  • package_reference_count
  • project_reference_count
  • additional_properties_count (file-based apps only)

Why

Telemetry measurements are specifically designed for numeric data and enable the backend analytics system to perform:

  • Numeric comparisons and filters (e.g., sdk_count > 1)
  • Statistical aggregations (averages, percentiles, distributions)
  • Time-series analysis and trending

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:

properties["sdk_count"] = "2";
properties["package_reference_count"] = "5";
TelemetryEventEntry.TrackEvent(RunEventName, properties, measurements: null);

After:

var measurements = new Dictionary<string, double>
{
    ["sdk_count"] = 2,
    ["package_reference_count"] = 5,
};
TelemetryEventEntry.TrackEvent(RunEventName, properties, measurements);

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

On RunTelemetry.cs:39-42, Instead of storing these parameters as event properties, they should be measurements. Making them measurements lets us do numeric comparisons more easily on the backend.


💡 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.

@Copilot Copilot AI changed the title [WIP] Instead of storing these parameters as event _properties_, they should be _measurements_. Making them measurements lets us do numeric comparisons more easily on the backend. Convert numeric telemetry parameters to measurements for better analytics Sep 30, 2025
@Copilot Copilot AI requested a review from baronfel September 30, 2025 23:11
Copilot finished work on behalf of baronfel September 30, 2025 23:11
@baronfel baronfel requested review from DamianEdwards and a team September 30, 2025 23:13
@baronfel baronfel marked this pull request as ready for review September 30, 2025 23:13
@baronfel
Copy link
Member

baronfel commented Oct 1, 2025

Approved over email - failing tests should just be the GenerateBundle known issue. @marcpopMSFT / @MiYanni can either of you merge on red?

@baronfel
Copy link
Member

baronfel commented Oct 1, 2025

/ba-g GenerateBundle known issue with a fix on the way.

@baronfel baronfel added this to the 10.0.1xx milestone Oct 1, 2025
@baronfel baronfel force-pushed the copilot/fix-4181b29c-4cd7-47c3-92cf-03b15a5884db branch from 6205642 to 5c69c4d Compare October 1, 2025 20:28
@baronfel
Copy link
Member

baronfel commented Oct 2, 2025

@marcpopMSFT / @MiYanni can I get a merge on red for this one? it's approved and stuck on the generatebundle known issue stuff. Alternatively if we implement @nagilson's check then I can stop bugging y'all.

@dsplaisted
Copy link
Member

@baronfel One of the failures looks like it may be a different issue:

gcc : error : unrecognized command-line option ‘--target=aarch64-linux-gnu’ [/datadisks/disk1/work/A8D608FB/t/dotnetSdkTests.yz4rv7NH/NativeAot_hw_---A76DA500/HelloWorldUnsupportedHostRid/HelloWorldUnsupportedHostRid.csproj]

@nagilson I saw this on another PR, do you know what that one is?

@baronfel
Copy link
Member

baronfel commented Oct 2, 2025

@dsplaisted that's this known issue: #51049, I think @nagilson's poked some folks about relatively recent changes in Targets files that are causing this.

@nagilson
Copy link
Member

nagilson commented Oct 2, 2025

That's fixed, but it cant be merged because generate asset bundles is still failing. If you may please update the repo config so we can merge with known issues then that fix can be merged #51084

@nagilson
Copy link
Member

nagilson commented Oct 2, 2025

Alternatively, someone could grant me admin rights on the sdk repo 🥺

@marcpopMSFT
Copy link
Member

Two different known issues, merging as it's approved

@marcpopMSFT marcpopMSFT merged commit db38a80 into release/10.0.1xx Oct 2, 2025
23 of 27 checks passed
@marcpopMSFT marcpopMSFT deleted the copilot/fix-4181b29c-4cd7-47c3-92cf-03b15a5884db branch October 2, 2025 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants