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
Modifier and TypeMethodDescriptionstatic TracingMetadataempty()Returns an empty tracing metadata.static Optional<TracingMetadata>fromMessage(Message<?> message) io.opentelemetry.context.Contextio.opentelemetry.context.Contextstatic TracingMetadatawith(io.opentelemetry.context.Context currentSpanContext, io.opentelemetry.context.Context previousSpanContext) static TracingMetadatawithCurrent(io.opentelemetry.context.Context currentContext) static TracingMetadatawithPrevious(io.opentelemetry.context.Context previousContext) withSpan(io.opentelemetry.api.trace.Span span) Deprecated.
-
Method Details
-
empty
Returns an empty tracing metadata.- Returns:
- the empty instance
-
fromMessage
- Parameters:
message- message containing metadata, must not benull.- Returns:
- an
Optionalcontaining the attachedTracingMetadata, empty if none.
-
withPrevious
-
withCurrent
-
with
public static TracingMetadata with(io.opentelemetry.context.Context currentSpanContext, io.opentelemetry.context.Context previousSpanContext) -
withSpan
Deprecated. -
getCurrentContext
public io.opentelemetry.context.Context getCurrentContext() -
getPreviousContext
public io.opentelemetry.context.Context getPreviousContext()
-