Skip to content

Fix sdk stats version emission for shim#3076

Merged
mattsains-msft merged 13 commits into
microsoft:mainfrom
mattsains-msft:sdkstats-update
Jan 15, 2026
Merged

Fix sdk stats version emission for shim#3076
mattsains-msft merged 13 commits into
microsoft:mainfrom
mattsains-msft:sdkstats-update

Conversation

@mattsains-msft
Copy link
Copy Markdown
Member

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

  • I ran Unit Tests locally.
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public surface reviewed

The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.

Notes for authors:

  • FxCop and other analyzers will fail the build. To see these errors yourself, compile localy using the Release configuration.

Copilot AI review requested due to automatic review settings January 14, 2026 22:54
Copy link
Copy Markdown
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 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 VersionUtils class to extract version information from assemblies
  • Updated OpenTelemetry resource configuration to include telemetry.distro.version attribute in all shim packages
  • Consolidated AssemblyInfo class 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.

Comment thread BASE/src/Microsoft.ApplicationInsights/Internal/VersionUtils.cs Outdated
Comment thread BASE/src/Microsoft.ApplicationInsights/Internal/VersionUtils.cs Outdated
Comment thread BASE/src/Microsoft.ApplicationInsights/Internal/VersionUtils.cs
Comment thread CHANGELOG.md Outdated
Comment thread BASE/src/Microsoft.ApplicationInsights/Internal/VersionUtils.cs Outdated
Comment thread WEB/Src/Web/Web/Properties/AssemblyInfo.cs Outdated
@rajkumar-rangaraj
Copy link
Copy Markdown
Member

@mattsains-msft, please rebase your branch with main.

@mattsains-msft mattsains-msft changed the base branch from develop to main January 15, 2026 18:56
@mattsains-msft mattsains-msft dismissed rajkumar-rangaraj’s stale review January 15, 2026 18:56

The base branch was changed.

Matthew Sainsbury added 3 commits January 15, 2026 11:01
@mattsains-msft mattsains-msft merged commit 928e61c into microsoft:main Jan 15, 2026
22 checks passed
@mattsains-msft mattsains-msft deleted the sdkstats-update branch January 16, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants