@Experimental(value="Tracer metadata is a SmallRye specific feature for integrating with OpenTelemetry") public class TracingMetadata extends Object
Modifier and Type | Method and Description |
---|---|
static TracingMetadata |
empty()
Returns an empty tracing metadata.
|
static Optional<TracingMetadata> |
fromMessage(Message<?> message)
|
io.opentelemetry.api.trace.SpanContext |
getCurrentSpanContext() |
io.opentelemetry.context.Context |
getPreviousContext() |
static TracingMetadata |
withPrevious(io.opentelemetry.context.Context previousContext) |
TracingMetadata |
withSpan(io.opentelemetry.api.trace.Span span) |
public static TracingMetadata empty()
public static Optional<TracingMetadata> fromMessage(Message<?> message)
message
- message containing metadata, must not be null
.Optional
containing the attached TracingMetadata
,
empty if none.public static TracingMetadata withPrevious(io.opentelemetry.context.Context previousContext)
public TracingMetadata withSpan(io.opentelemetry.api.trace.Span span)
public io.opentelemetry.api.trace.SpanContext getCurrentSpanContext()
public io.opentelemetry.context.Context getPreviousContext()
Copyright © 2018–2021 SmallRye. All rights reserved.