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

Implement global default non-recording span #1901

Merged
merged 10 commits into from
May 12, 2021

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented May 11, 2021

This adds a non-recording span implementation to the internal global package and returns that span implementation by default. This implementation, like the non-recording span implementation in the trace package, performs no operation except to return the parent SpanContext of the span. This ensures traces are not broken if no SDK is registered.

This copies the nonRecordingSpan implementation rather than importing it from a centralized package to avoid a dependency cycle. It may be possible through a large refactor to unify this, but that can be done in the future if there is ever deemed a sufficient need.

Resolves #1893
Resolves #877

@MrAlias MrAlias added bug Something isn't working area:trace Part of OpenTelemetry tracing release:1.0.0-rc.1 labels May 11, 2021
@MrAlias MrAlias added this to the RC1 milestone May 11, 2021
@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #1901 (464d950) into main (b6d5442) will decrease coverage by 0.0%.
The diff coverage is 50.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #1901     +/-   ##
=======================================
- Coverage   79.4%   79.3%   -0.1%     
=======================================
  Files        139     139             
  Lines       7414    7425     +11     
=======================================
+ Hits        5889    5892      +3     
- Misses      1279    1286      +7     
- Partials     246     247      +1     
Impacted Files Coverage Δ
internal/global/trace.go 83.7% <50.0%> (-16.3%) ⬇️
trace/noop.go 46.1% <0.0%> (-7.7%) ⬇️
sdk/trace/batch_span_processor.go 85.6% <0.0%> (-1.6%) ⬇️
trace.go 100.0% <0.0%> (+33.3%) ⬆️

@MrAlias MrAlias marked this pull request as ready for review May 12, 2021 15:26
@Aneurysm9 Aneurysm9 merged commit 63e0ecf into open-telemetry:main May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect API behavior in absence of SDK Have a ForwardPropagator for istio
4 participants