Package org.springframework.cloud.sleuth
Interface TraceContext.Builder
-
- Enclosing interface:
- TraceContext
public static interface TraceContext.BuilderBuilder forTraceContext.- Since:
- 3.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TraceContextbuild()Builds the trace context.TraceContext.BuilderparentId(String parentId)Sets parent id on the trace context.TraceContext.Buildersampled(Boolean sampled)Sets sampled on the trace context.TraceContext.BuilderspanId(String spanId)Sets span id on the trace context.TraceContext.BuildertraceId(String traceId)Sets trace id on the trace context.
-
-
-
Method Detail
-
traceId
TraceContext.Builder traceId(String traceId)
Sets trace id on the trace context.- Parameters:
traceId- trace id- Returns:
- this
-
parentId
TraceContext.Builder parentId(String parentId)
Sets parent id on the trace context.- Parameters:
parentId- parent trace id- Returns:
- this
-
spanId
TraceContext.Builder spanId(String spanId)
Sets span id on the trace context.- Parameters:
spanId- span id- Returns:
- this
-
sampled
TraceContext.Builder sampled(Boolean sampled)
Sets sampled on the trace context.- Parameters:
sampled- if span is sampled- Returns:
- this
-
build
TraceContext build()
Builds the trace context.- Returns:
- trace context
-
-