Package io.opentelemetry.sdk.trace.data
Interface StatusData
-
- All Known Implementing Classes:
AutoValue_ImmutableStatusData,ImmutableStatusData
@Immutable 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 Modifier and Type Method Description static StatusDatacreate(StatusCode code, java.lang.String description)static StatusDataerror()Returns aStatusDataindicating an error occurred.java.lang.StringgetDescription()Returns the description of thisStatusfor human consumption.StatusCodegetStatusCode()Returns the status code.static 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(StatusCode code, @Nullable java.lang.String description)
Returns aStatusDatawith the givencodeanddescription. Ifdescriptionisnull, the returnedStatusDatadoes not have a description.
-
getStatusCode
StatusCode getStatusCode()
Returns the status code.
-
getDescription
java.lang.String getDescription()
Returns the description of thisStatusfor human consumption.- Returns:
- the description of this
Status.
-
-