Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repo] Fix tests reliant on bugged sampling behavior #6097

Merged
merged 9 commits into from
Jan 27, 2025

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Jan 23, 2025

Fixes #6093

Changes

  • Adjusts sampling logic used in tests to work with upcoming .NET 10 behavior
  • Fixes tests which register ActivityListeners to clean up after themselves

Details

There is a bug fix coming in .NET 10: dotnet/runtime#111289

It seems some of our tests are reliant on the bugged behavior. What this PR does is correct the test logic so it will work now and with the correct behavior coming in .NET 10.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated

@CodeBlanch CodeBlanch requested a review from a team as a code owner January 23, 2025 22:30
@github-actions github-actions bot added pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package pkg:OpenTelemetry.Exporter.Zipkin Issues related to OpenTelemetry.Exporter.Zipkin NuGet package pkg:OpenTelemetry.Shims.OpenTracing Issues related to OpenTelemetry.Shims.OpenTracing NuGet package labels Jan 23, 2025
@CodeBlanch CodeBlanch merged commit e5a7095 into open-telemetry:main Jan 27, 2025
31 checks passed
@CodeBlanch CodeBlanch deleted the repo-sampling-fixes branch January 27, 2025 17:50
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.40%. Comparing base (cd8cb41) to head (a27931e).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6097   +/-   ##
=======================================
  Coverage   86.40%   86.40%           
=======================================
  Files         257      257           
  Lines       11649    11649           
=======================================
  Hits        10065    10065           
  Misses       1584     1584           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package pkg:OpenTelemetry.Exporter.Zipkin Issues related to OpenTelemetry.Exporter.Zipkin NuGet package pkg:OpenTelemetry.Shims.OpenTracing Issues related to OpenTelemetry.Shims.OpenTracing NuGet package
Projects
None yet
3 participants