Module io.helidon.tracing
Package io.helidon.tracing
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
Fluent API builder to create a new
Span
.-
Method Summary
Modifier and TypeMethodDescriptionKind of this span.parent
(SpanContext spanContext) Parent span of the new span.default Span
start()
Build and start the span with current timestamp.Start the span with an explicit timestamp.default B
Add a tag.Add a boolean tag.Add a number tag.Add a string tag.default <T> T
Unwrap 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
Kind of this span.- Parameters:
kind
- kind to use- Returns:
- updated builder instance
-
tag
Add a tag.- Parameters:
tag
- tag to add (or set)- Returns:
- updated builder instance
-
tag
Add a string tag.- Parameters:
key
- tag keyvalue
- tag value- Returns:
- updated builder instance
-
tag
Add a boolean tag.- Parameters:
key
- tag keyvalue
- tag value- Returns:
- updated builder instance
-
tag
Add a number tag.- Parameters:
key
- tag keyvalue
- tag value- Returns:
- updated builder instance
-
start
Build and start the span with current timestamp.- Returns:
- newly created and started span
-
start
Start the span with an explicit timestamp.- Parameters:
instant
- when the span started- Returns:
- newly created and started span
-
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
-