Skip to content

[clr-ios] Add UseMonoRuntime and PublishReadyToRun to the for the build and publish telemetry#53263

Open
kotlarmilos wants to merge 2 commits intodotnet:mainfrom
kotlarmilos:feature/clr-ios-telemetry
Open

[clr-ios] Add UseMonoRuntime and PublishReadyToRun to the for the build and publish telemetry#53263
kotlarmilos wants to merge 2 commits intodotnet:mainfrom
kotlarmilos:feature/clr-ios-telemetry

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Mar 4, 2026

Description

This PR adds UseMonoRuntime and PublishReadyToRun to the publish telemetry. It adds a _WorkloadBuildTelemetry target that is invoked AfterTargets=Build with the build properties.

Fixes dotnet/runtime#124746

@dotnet-policy-service
Copy link
Contributor

This PR has been labeled with Area-Telemetry. Please ensure that any telemetry changes in this PR

Copy link
Contributor

Copilot AI left a 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 extends the workload telemetry system for iOS/mobile targets to capture UseMonoRuntime and PublishReadyToRun properties in both publish and build scenarios. Previously, the WorkloadPublishProperties telemetry event (fired after Publish) lacked these two properties; now they are added there, and a new _WorkloadBuildTelemetry target is introduced that fires after Build to emit a separate WorkloadBuildProperties event with the same set of core properties (but without publish-only extras like BlazorWasm, WasmSDK, UsesMobileSDKOnly, UsesOtherMobileSDK, LibraryMode, StripILAfterAOT).

Changes:

  • UseMonoRuntime and PublishReadyToRun added to the existing WorkloadPublishProperties (publish telemetry)
  • New _WorkloadBuildTelemetry MSBuild target added, firing AfterTargets="Build" to emit a WorkloadBuildProperties telemetry event with build-time properties
  • New WorkloadBuildPropertiesTelemetryEventName constant registered in MSBuildLogger as a pass-through event, with a corresponding unit test

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets Adds UseMonoRuntime/PublishReadyToRun to publish telemetry; adds new _WorkloadBuildTelemetry target for build-time telemetry
src/Cli/dotnet/Commands/MSBuild/MSBuildLogger.cs Registers new WorkloadBuildProperties event name as a pass-through telemetry event
test/dotnet.Tests/CommandTests/MSBuild/GivenMSBuildLogger.cs Unit test verifying WorkloadBuildProperties telemetry passes through correctly with expected properties

You can also share your feedback on Copilot code review. Take the survey.

@baronfel
Copy link
Member

baronfel commented Mar 4, 2026

UseMonoRuntime and PublishReadyToRun are already tracked in the targetframeworkeval event, which is fired for both Build and Publish workflows - are there data points missing from that event that you all otherwise need?

@kotlarmilos
Copy link
Member Author

You are right, I missed that. This PR adds more granular mobile telemetry info about mobile setup (R2R vs Interp vs JIT). Is there an overhead to emitting these additional events?

@baronfel
Copy link
Member

baronfel commented Mar 4, 2026

There is mild overhead, but not enough to prevent adding new events of course. I see now that there was existing workload build data and this is expanding the existing pattern, so I'll shut up now :)

@matouskozak
Copy link
Member

matouskozak commented Mar 4, 2026

This PR adds more granular mobile telemetry info about mobile setup (R2R vs Interp vs JIT).

If there is any missing telemetry, we could probably add it to the same place as done in https://github.com/dotnet/sdk/pull/50561/changes (it should already track most of the needed stuff).

There should be a way to connect the targetframeworkeval with build/publish event, right @baronfel ?

@baronfel
Copy link
Member

baronfel commented Mar 4, 2026

@matouskozak yes, the events will have a shared SessionId property that can be used to join against.

@kotlarmilos kotlarmilos requested a review from baronfel March 13, 2026 08:02
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.

[clr-ios] Enable telemetry on CoreCLR mobile platforms

4 participants