Package io.opentelemetry.sdk.trace.data
Interface StatusData
@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 StatusDatastatic StatusDataerror()Returns aStatusDataindicating an error occurred.Returns the description of thisStatusfor human consumption.io.opentelemetry.api.trace.StatusCodeReturns 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
io.opentelemetry.api.trace.StatusCode getStatusCode()Returns the status code. -
getDescription
String getDescription()Returns the description of thisStatusfor human consumption.- Returns:
- the description of this
Status.
-