Package io.opentelemetry.sdk.trace.data
Interface StatusData
- All Known Implementing Classes:
AutoValue_ImmutableStatusData,ImmutableStatusData
@Immutable
public interface StatusData
Defines the status of a
Span by providing a standard StatusCode in conjunction
with an optional descriptive message.-
Method Summary
Modifier and TypeMethodDescriptionstatic StatusDatacreate(StatusCode code, String description) static StatusDataerror()Returns aStatusDataindicating an error occurred.Returns the description of thisStatusfor human consumption.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 Details
-
ok
Returns aStatusDataindicating the operation has been validated by an application developer or operator to have completed successfully. -
unset
Returns the defaultStatusData. -
error
Returns aStatusDataindicating an error occurred. -
create
Returns aStatusDatawith the givencodeanddescription. Ifdescriptionisnull, the returnedStatusDatadoes not have a description. -
getStatusCode
StatusCode getStatusCode()Returns the status code. -
getDescription
String getDescription()Returns the description of thisStatusfor human consumption.- Returns:
- the description of this
Status.
-