Fix sdk stats version emission for shim#3076
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes SDK stats version emission for the Application Insights shim layer by using the telemetry.distro.version attribute to report the correct version of each shim package rather than the underlying Azure SDK version.
Changes:
- Added a new
VersionUtilsclass to extract version information from assemblies - Updated OpenTelemetry resource configuration to include
telemetry.distro.versionattribute in all shim packages - Consolidated
AssemblyInfoclass definitions by removing duplicates and adding InternalsVisibleTo attributes
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| BASE/src/Microsoft.ApplicationInsights/Internal/VersionUtils.cs | New utility class for extracting assembly version information |
| BASE/src/Microsoft.ApplicationInsights/OpenTelemetryBuilderExtensions.cs | Added telemetry.distro.version attribute using VersionUtils |
| BASE/src/Microsoft.ApplicationInsights/Properties/AssemblyInfo.cs | Added InternalsVisibleTo for Microsoft.AI.Web |
| NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Extensions/ApplicationInsightsExtensions.cs | Added telemetry.distro.version attribute using VersionUtils |
| NETCORE/src/Microsoft.ApplicationInsights.WorkerService/ApplicationInsightsExtensions.cs | Added telemetry.distro.version attribute using VersionUtils |
| WEB/Src/Web/Web/Extensions/ApplicationInsightsExtensions.cs | Added telemetry.distro.version attribute using VersionUtils |
| WEB/Src/Web/Web/Properties/AssemblyInfo.cs | Removed duplicate AssemblyInfo class definition |
| WEB/Src/Web/Web/Web.csproj | Removed unnecessary file link to Extensions.cs |
| CHANGELOG.md | Added changelog entry for the fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rajkumar-rangaraj
previously approved these changes
Jan 14, 2026
Member
|
@mattsains-msft, please rebase your branch with main. |
0246725 to
7ff884a
Compare
The base branch was changed.
rajkumar-rangaraj
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Uses the new ability for SDK stats to use telemetry.distro.version to report the version of the shim, rather than the Azure SDK version.
Checklist
For significant contributions please make sure you have completed the following items:
The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.
Notes for authors: