Interface SpanStatusBuilder
public interface SpanStatusBuilder
A builder that exposes methods for setting the status of a span.
-
Method Summary
Modifier and TypeMethodDescriptiondefault SpanStatusBuildersetStatus(io.opentelemetry.api.trace.StatusCode statusCode) Sets the status to theSpan.Sets the status to theSpan.
-
Method Details
-
setStatus
@CanIgnoreReturnValue default SpanStatusBuilder setStatus(io.opentelemetry.api.trace.StatusCode statusCode) Sets the status to theSpan.If used, this will override the default
Spanstatus. Default status code isStatusCode.UNSET.Only the value of the last call will be recorded, and implementations are free to ignore previous calls.
- Parameters:
statusCode- theStatusCodeto set.- Returns:
- this.
- See Also:
-
Span.setStatus(StatusCode)
-
setStatus
@CanIgnoreReturnValue SpanStatusBuilder setStatus(io.opentelemetry.api.trace.StatusCode statusCode, String description) Sets the status to theSpan.If used, this will override the default
Spanstatus. Default status code isStatusCode.UNSET.Only the value of the last call will be recorded, and implementations are free to ignore previous calls.
- Parameters:
statusCode- theStatusCodeto set.description- the description of theStatus.- Returns:
- this.
- See Also:
-
Span.setStatus(StatusCode, String)
-