Repository navigation
Fix source-build reference assembly leak from OpenTelemetry dependency - #9803
Merged
mthalman merged 1 commit intoSep 28, 2026
Merged
Conversation
Use the flowed Configuration.Ini package version to lift OpenTelemetry's transitive EnvironmentVariables dependency and prevent reference assembly leakage into the SDK. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
mthalman
enabled auto-merge (squash)
September 28, 2026 18:44
lbussell
approved these changes
Sep 28, 2026
Member
Author
|
/backport to release/11.0.1xx |
Member
Author
|
/backport to main |
Contributor
|
Started backporting to |
Contributor
|
Started backporting to |
This was referenced Sep 28, 2026
Merged
This was referenced Oct 21, 2026
This was referenced Oct 24, 2026
This was referenced Nov 1, 2026
This was referenced Nov 10, 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.
OpenTelemetry 1.18.0 introduces a transitive dependency on
Microsoft.Extensions.Configuration.EnvironmentVariables10.0.0, allowing a source-build reference assembly to leak into the SDK. Pin it centrally to the existing flowedMicrosoftExtensionsConfigurationIniPackageVersionso it uses the current runtime implementation instead.Reproduction
Set
DOTNET_CLI_TELEMETRY_OPTOUT=0to enable telemetry and invoke the affected SDK's managed CLI with--version. During startup,TelemetryClientbuilds an OpenTelemetry provider, which callsAddEnvironmentVariablesand attempts to load the reference assembly:Telemetry defaults off in the tested source-built SDK, so leaving the variable unset or setting it to
1avoids this path. SettingOTEL_SDK_DISABLED=truedoes not avoid the failure because OpenTelemetry resolves configuration before checking that setting.Validation
11.0.100-rc.2.26476.104--versionsucceeds11.0.100-rc.2.26478.101--versionsucceeds--versionsucceedsInspected the actual shipped SDK-root DLL: the original has
ReferenceAssemblyAttributeandsource=source-build-reference-packagesmetadata; the patched output has neither marker.Execution was verified using the shipped managed CLI assemblies on the Windows .NET runtime, not an end-to-end CentOS or NativeAOT run.