Interface Span.Builder<B extends Span.Builder<B>>
- Type Parameters:
B- type of the builder that implements this interface, to have correct return types of builder methods
- Enclosing interface:
Span
-
Method Summary
Modifier and TypeMethodDescriptionKind of this span.parent(SpanContext spanContext) Parent span of the new span.default Spanstart()Build and start the span with current timestamp.Start the span with an explicit timestamp.default BAdd a tag.Add a boolean tag.Add a number tag.Add a string tag.default <T> TUnwrap this builder instance into a known type.
-
Method Details
-
parent
Parent span of the new span.- Parameters:
spanContext- span context to be the parent of this span- Returns:
- updated builder instance
-
kind
-
tag
-
tag
-
tag
-
tag
-
start
Build and start the span with current timestamp.- Returns:
- newly created and started span
-
start
-
unwrap
Unwrap this builder instance into a known type. This method limits abstraction and will not allow replacement of tracer implementation.- Type Parameters:
T- type of the builder- Parameters:
type- type to unwrap to- Returns:
- unwrapped instance
- Throws:
IllegalArgumentException- when the expected type is not the actual type, or the builder cannot be coerced into that type
-