Skip to content

[traces] Fix tracing bridge cleanup on older target frameworks - #8065

Merged
martincostello merged 3 commits into
open-telemetry:mainfrom
Kielek:codex/fix-tracing-bridge-cleanup
Oct 29, 2026
Merged

martincostello merged 3 commits into
open-telemetry:mainfrom
Kielek:codex/fix-tracing-bridge-cleanup

Conversation

@Kielek

@Kielek Kielek commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #6899.

Changes

Fix tracing-bridge cleanup on older target frameworks in the ITracingBuilder
integration added by #6899. Attachment uses !NET10_0, but cleanup used
NET11_0_OR_GREATER, leaving the bridge attached in the net462, netstandard2.0
and netstandard2.1 SDK assets. If the factory and source outlive the provider,
new activities can still invoke sampling after shutdown or call a disposed sampler.

Align all cleanup guards with attachment and enable the existing tracing-builder
integration tests on .NET Framework. Add Microsoft.Extensions.Diagnostics 11 only
to the older-framework test target so it can call AddTracing; the shipped
packages gain no dependency. Found through Codex Security Cloud.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, successful build/tests, etc.)
  • Tests added/updated
  • CHANGELOG.md file(s) updated for non-trivial changes
  • Changes in public API reviewed (if applicable): no public API changes
  • AI usage disclosure:
    • No AI used
    • AI-assisted
    • Bulk AI-generated
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR1

Note

This PR description was generated with OpenAI Codex.

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR without using AI. ↩

Align provider cleanup guards with tracing bridge attachment and extend
hosting regression coverage to .NET Framework.

Follow-up to open-telemetry#6899.

Discovered by Codex Security Cloud, finding commit:3cccd8cddf68819197beb149951962f6.
@github-actions github-actions Bot added infra Infra work - CI/CD, code coverage, linters dependencies Pull requests that update a dependency file pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package pkg:OpenTelemetry.Extensions.Hosting Issues related to OpenTelemetry.Extensions.Hosting NuGet package labels Oct 29, 2026
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-29 14:42 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Link the Unreleased entry to PR open-telemetry#8065.

Discovered by Codex Security Cloud, finding commit:3cccd8cddf68819197beb149951962f6.
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.72%. Comparing base (d41d4d2) to head (b1206ec).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8065      +/-   ##
==========================================
- Coverage   90.76%   90.72%   -0.04%     
==========================================
  Files         382      382              
  Lines       22574    22574              
  Branches     4177     4177              
==========================================
- Hits        20490    20481       -9     
- Misses       1505     1510       +5     
- Partials      579      583       +4     
Flag Coverage Δ
unittests-PowerShellScripts 88.99% <ø> (ø)
unittests-Project-Experimental 90.77% <ø> (+<0.01%) ⬆️
unittests-Project-Stable 90.65% <ø> (-0.14%) ⬇️
unittests-Solution 90.74% <ø> (-0.04%) ⬇️
unittests-UnstableCoreLibraries-Experimental 43.22% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/OpenTelemetry/Trace/TracerProviderSdk.cs 92.46% <ø> (ø)

... and 3 files with indirect coverage changes

@Kielek
Kielek marked this pull request as ready for review October 29, 2026 13:20
@Kielek
Kielek requested a review from a team as a code owner October 29, 2026 13:20
@Kielek
Kielek enabled auto-merge October 29, 2026 13:24
@Kielek
Kielek added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 29, 2026
This was referenced Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file infra Infra work - CI/CD, code coverage, linters pkg:OpenTelemetry.Extensions.Hosting Issues related to OpenTelemetry.Extensions.Hosting NuGet package pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants