Skip to content

4.x Provide a way to retrieve telemetry baggage from a SpanContext without having to start a Span #8319

Closed
@tjquinno

Description

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

The Helidon neutral tracing API provides access to baggage associated with a Span.

Sometimes, though, code has a SpanContext available (such as the one Helidon prepares for an incoming HTTP request) and for that code's purposes needs only the baggage, not an actual span.

The workaround is this:

SpanContext spanContext = // from somewhere
Span.Builder<?> b = tracer.spanBuilder("example");
Span span = b.parent(spanContext).start();
Optional<String> baggageValue = span.baggage("keyName");

This issue captures the request to add a way to retrieve baggage from a SpanContext without having to create a Span.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions