Package org.springframework.cloud.sleuth
Interface TraceContext.Builder
-
- Enclosing interface:
- TraceContext
public static interface TraceContext.Builder
Builder forTraceContext
.- Since:
- 3.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TraceContext
build()
Builds the trace context.TraceContext.Builder
parentId(String parentId)
Sets parent id on the trace context.TraceContext.Builder
sampled(Boolean sampled)
Sets sampled on the trace context.TraceContext.Builder
spanId(String spanId)
Sets span id on the trace context.TraceContext.Builder
traceId(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
-
-