Class SimpleTraceContext
java.lang.Object
io.micrometer.tracing.test.simple.SimpleTraceContext
- All Implemented Interfaces:
io.micrometer.tracing.TraceContext
A test implementation of a trace context.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.tracing.TraceContext
io.micrometer.tracing.TraceContext.Builder -
Field Summary
Fields inherited from interface io.micrometer.tracing.TraceContext
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparentId()sampled()voidsetParentId(String parentId) Sets the parent span id.voidsetSampled(Boolean sampled) Sets the sampling decision.voidSets the span id.voidsetTraceId(String traceId) Sets the trace id.spanId()toString()traceId()
-
Constructor Details
-
SimpleTraceContext
public SimpleTraceContext()
-
-
Method Details
-
traceId
- Specified by:
traceIdin interfaceio.micrometer.tracing.TraceContext
-
parentId
- Specified by:
parentIdin interfaceio.micrometer.tracing.TraceContext
-
spanId
- Specified by:
spanIdin interfaceio.micrometer.tracing.TraceContext
-
sampled
- Specified by:
sampledin interfaceio.micrometer.tracing.TraceContext
-
setTraceId
Sets the trace id.- Parameters:
traceId- trace id
-
setParentId
Sets the parent span id.- Parameters:
parentId- parent span id
-
setSpanId
Sets the span id.- Parameters:
spanId- span id
-
setSampled
Sets the sampling decision.- Parameters:
sampled- sampled, or not?
-
toString
-