Package io.smallrye.reactive.messaging
Class TracingMetadata
- java.lang.Object
-
- io.smallrye.reactive.messaging.TracingMetadata
-
@Experimental("Tracer metadata is a SmallRye specific feature for integrating with OpenTelemetry") public class TracingMetadata extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TracingMetadata
empty()
Returns an empty tracing metadata.static Optional<TracingMetadata>
fromMessage(Message<?> message)
io.opentelemetry.trace.SpanContext
getCurrentSpanContext()
io.opentelemetry.trace.SpanContext
getPreviousSpanContext()
static TracingMetadata
withPrevious(io.opentelemetry.trace.Span span)
TracingMetadata
withSpan(io.opentelemetry.trace.Span span)
-
-
-
Method Detail
-
empty
public static TracingMetadata empty()
Returns an empty tracing metadata.- Returns:
- the empty instance
-
fromMessage
public static Optional<TracingMetadata> fromMessage(Message<?> message)
- Parameters:
message
- message containing metadata, must not benull
.- Returns:
- an
Optional
containing the attachedTracingMetadata
, empty if none.
-
withPrevious
public static TracingMetadata withPrevious(io.opentelemetry.trace.Span span)
-
withSpan
public TracingMetadata withSpan(io.opentelemetry.trace.Span span)
-
getCurrentSpanContext
public io.opentelemetry.trace.SpanContext getCurrentSpanContext()
-
getPreviousSpanContext
public io.opentelemetry.trace.SpanContext getPreviousSpanContext()
-
-