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

[OT Shim] Fully support Baggage-only propagation. #4739

Merged

Conversation

carlosalberto
Copy link
Contributor

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

This includes both in-process and inter-process propagation.
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

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

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%) ⬆️
...ava/io/opentelemetry/opentracingshim/SpanShim.java 87.61% <100.00%> (+0.11%) ⬆️
...ava/io/opentelemetry/sdk/internal/RateLimiter.java 94.11% <0.00%> (-5.89%) ⬇️
...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%) ⬆️

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

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

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Just one minor comment

@carlosalberto
Copy link
Contributor Author

Anything else to merge this PR?

@jack-berg jack-berg merged commit 88c894b into open-telemetry:main Sep 27, 2022
@jack-berg
Copy link
Member

Looks good - Sorry about the delay @carlosalberto!

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.

2 participants