opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

[OT Shim] Fully support Baggage-only propagation.

Open carlosalberto opened this issue 3 years ago • 1 comments

Baggage without a valid Span should still be properly propagated in inter-process and in-process operations.

This is part of the OT compatibility section - essentially, the changes are:

  1. ActiveSpan():

If the current OpenTelemetry Span's SpanContext is invalid but the current Baggage is not empty, this operation MUST return a new Span Shim containing a no-op OpenTelemetry Span and the non-empty Baggage.

  1. Tracer.Extract()

If the extracted SpanContext is invalid AND the extracted Baggage is empty, this operation MUST return a null value, and otherwise it MUST return a SpanContext Shim instance with the extracted values.

cc @zeitlinger

carlosalberto avatar Sep 09 '22 17:09 carlosalberto

Codecov Report

Base: 90.77% // Head: 90.77% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (58a3ad8) compared to base (6c11793). Patch coverage: 90.90% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4739   +/-   ##
=========================================
  Coverage     90.77%   90.77%           
- Complexity     4815     4816    +1     
=========================================
  Files           551      551           
  Lines         14356    14358    +2     
  Branches       1395     1395           
=========================================
+ Hits          13031    13033    +2     
  Misses          909      909           
  Partials        416      416           
Impacted Files Coverage Δ
...opentelemetry/opentracingshim/SpanBuilderShim.java 77.89% <ø> (ø)
...pentelemetry/opentracingshim/ScopeManagerShim.java 94.44% <85.71%> (ø)
.../io/opentelemetry/opentracingshim/Propagation.java 87.50% <100.00%> (+0.40%) :arrow_up:
...ava/io/opentelemetry/opentracingshim/SpanShim.java 87.61% <100.00%> (+0.11%) :arrow_up:
...ava/io/opentelemetry/sdk/internal/RateLimiter.java 94.11% <0.00%> (-5.89%) :arrow_down:
...telemetry/sdk/common/InstrumentationScopeInfo.java 100.00% <0.00%> (ø)
...elemetry/sdk/testing/assertj/AttributesAssert.java 98.86% <0.00%> (ø)
...try/exporter/zipkin/ZipkinSpanExporterBuilder.java 100.00% <0.00%> (ø)
.../opentelemetry/exporter/prometheus/Serializer.java 86.44% <0.00%> (+0.42%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 09 '22 17:09 codecov[bot]

Anything else to merge this PR?

carlosalberto avatar Sep 26 '22 17:09 carlosalberto

Looks good - Sorry about the delay @carlosalberto!

jack-berg avatar Sep 27 '22 14:09 jack-berg