Package org.springframework.cloud.sleuth
Interface TraceContext.Builder
- Enclosing interface:
- TraceContext
public static interface TraceContext.Builder
Builder for
TraceContext.- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the trace context.Sets parent id on the trace context.Sets sampled on the trace context.Sets span id on the trace context.Sets trace id on the trace context.
-
Method Details
-
traceId
Sets trace id on the trace context.- Parameters:
traceId- trace id- Returns:
- this
-
parentId
Sets parent id on the trace context.- Parameters:
parentId- parent trace id- Returns:
- this
-
spanId
Sets span id on the trace context.- Parameters:
spanId- span id- Returns:
- this
-
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
-