Package io.opentelemetry.sdk.trace.data
Interface SpanData.Status
-
- Enclosing interface:
- SpanData
public static interface SpanData.StatusDefines the status of aSpanby providing a standardStatusCodein conjunction with an optional descriptive message.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SpanData.Statuscreate(io.opentelemetry.api.trace.StatusCode code, String description)static SpanData.Statuserror()Returns aSpanData.Statusindicating an error occurred.StringgetDescription()Returns the description of thisStatusfor human consumption.io.opentelemetry.api.trace.StatusCodegetStatusCode()Returns the status code.default booleanisOk()Returnstrueif thisStatusis ok, i.e., status is not set, or has been overridden to be ok by an operator.default booleanisUnset()Returnstrueif thisStatusis UNSET, i.e., not an error.static SpanData.Statusok()Returns aSpanData.Statusindicating the operation has been validated by an application developer or operator to have completed successfully.static SpanData.Statusunset()Returns the defaultSpanData.Status.
-
-
-
Method Detail
-
ok
static SpanData.Status ok()
Returns aSpanData.Statusindicating the operation has been validated by an application developer or operator to have completed successfully.
-
unset
static SpanData.Status unset()
Returns the defaultSpanData.Status.
-
error
static SpanData.Status error()
Returns aSpanData.Statusindicating an error occurred.
-
create
static SpanData.Status create(io.opentelemetry.api.trace.StatusCode code, @Nullable String description)
Returns aSpanData.Statuswith the givencodeanddescription. Ifdescriptionisnull, the returnedSpanData.Statusdoes not have a description.
-
getStatusCode
io.opentelemetry.api.trace.StatusCode getStatusCode()
Returns the status code.
-
getDescription
@Nullable String getDescription()
Returns the description of thisStatusfor human consumption.- Returns:
- the description of this
Status.
-
isUnset
default boolean isUnset()
Returnstrueif thisStatusis UNSET, i.e., not an error.- Returns:
trueif thisStatusis UNSET.
-
isOk
default boolean isOk()
Returnstrueif thisStatusis ok, i.e., status is not set, or has been overridden to be ok by an operator.- Returns:
trueif thisStatusis OK or UNSET.
-
-