Package io.opentelemetry.sdk.trace.data
Interface StatusData
-
public interface StatusDataDefines 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 Deprecated Methods Modifier and Type Method Description static StatusDatacreate(io.opentelemetry.api.trace.StatusCode code, String description)static StatusDataerror()Returns aStatusDataindicating an error occurred.StringgetDescription()Returns the description of thisStatusfor human consumption.io.opentelemetry.api.trace.StatusCodegetStatusCode()Returns the status code.default booleanisOk()Deprecated.ComparegetStatusCode()withStatusCode.ERRORdefault booleanisUnset()Deprecated.ComparegetStatusCode()withStatusCode.UNSETstatic StatusDataok()Returns aStatusDataindicating the operation has been validated by an application developer or operator to have completed successfully.static StatusDataunset()Returns the defaultStatusData.
-
-
-
Method Detail
-
ok
static StatusData ok()
Returns aStatusDataindicating the operation has been validated by an application developer or operator to have completed successfully.
-
unset
static StatusData unset()
Returns the defaultStatusData.
-
error
static StatusData error()
Returns aStatusDataindicating an error occurred.
-
create
static StatusData create(io.opentelemetry.api.trace.StatusCode code, @Nullable String description)
Returns aStatusDatawith the givencodeanddescription. Ifdescriptionisnull, the returnedStatusDatadoes 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
@Deprecated default boolean isUnset()
Deprecated.ComparegetStatusCode()withStatusCode.UNSETReturnstrueif thisStatusis UNSET, i.e., not an error.- Returns:
trueif thisStatusis UNSET.
-
isOk
@Deprecated default boolean isOk()
Deprecated.ComparegetStatusCode()withStatusCode.ERRORReturnstrueif thisStatusis ok, i.e., status is not set, or has been overridden to be ok by an operator.- Returns:
trueif thisStatusis OK or UNSET.
-
-