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

Opentracing shim noop cases #4668

Merged
merged 8 commits into from
Jul 21, 2023

Conversation

pjanotti
Copy link
Contributor

@pjanotti pjanotti commented Jul 19, 2023

Fixes #2787

Changes

  • Since the TelemetrySpan.NoopInstance has an invalid span context the shim should not raise an exception: it is an expected scenario.
  • Added integration tests for the shim, interacting with Activity and various sampling configurations to prevent similar regressions in the future.
  • Enabled the shim tests against net462.
  • Refactored the configuration of listeners in the tests, so different tests could have different configurations.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes

@pjanotti pjanotti requested a review from a team July 19, 2023 03:07
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #4668 (3cd1ea4) into main (358a1cd) will decrease coverage by 0.04%.
The diff coverage is n/a.

❗ Current head 3cd1ea4 differs from pull request most recent head 774e0b0. Consider uploading reports for the commit 774e0b0 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4668      +/-   ##
==========================================
- Coverage   85.06%   85.03%   -0.04%     
==========================================
  Files         314      314              
  Lines       12747    12721      -26     
==========================================
- Hits        10843    10817      -26     
  Misses       1904     1904              
Impacted Files Coverage Δ
...OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs 100.00% <ø> (ø)
src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs 81.52% <ø> (+0.67%) ⬆️

... and 4 files with indirect coverage changes

Copy link
Member

@alanwest alanwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alanwest alanwest merged commit d016bb1 into open-telemetry:main Jul 21, 2023
38 checks passed
@pjanotti pjanotti deleted the opentracing-shim-noop-cases branch July 21, 2023 21:37
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.

OpenTracingShim generate span with invalid spanContext for custom instrumentaion
3 participants