Class SimpleSpanAndScope
java.lang.Object
io.micrometer.tracing.SpanAndScope
io.micrometer.tracing.test.simple.SimpleSpanAndScope
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SimpleSpanAndScope
extends io.micrometer.tracing.SpanAndScope
Container object for
Span and its corresponding Tracer.SpanInScope.- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleSpanAndScope(io.micrometer.tracing.Span span, io.micrometer.tracing.Tracer.SpanInScope scope) Creates a new span and scopeSimpleSpanAndScope(io.micrometer.tracing.TraceContext traceContext, io.micrometer.tracing.Tracer.SpanInScope scope) Creates a new span and scope -
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.tracing.TraceContextGets the trace context.Methods inherited from class io.micrometer.tracing.SpanAndScope
close, getScope, getSpan, toString
-
Constructor Details
-
SimpleSpanAndScope
public SimpleSpanAndScope(io.micrometer.tracing.Span span, @Nullable io.micrometer.tracing.Tracer.SpanInScope scope) Creates a new span and scope- Parameters:
span- spanscope- scope
-
SimpleSpanAndScope
public SimpleSpanAndScope(io.micrometer.tracing.TraceContext traceContext, @Nullable io.micrometer.tracing.Tracer.SpanInScope scope) Creates a new span and scope- Parameters:
traceContext- trace contextscope- scope
-
-
Method Details
-
getTraceContext
public io.micrometer.tracing.TraceContext getTraceContext()Gets the trace context.- Returns:
- trace context
-