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 StatusData
static StatusData
error()
Returns aStatusData
indicating an error occurred.Returns the description of thisStatus
for human consumption.io.opentelemetry.api.trace.StatusCode
Returns the status code.static StatusData
ok()
Returns aStatusData
indicating the operation has been validated by an application developer or operator to have completed successfully.static StatusData
unset()
Returns the defaultStatusData
.
-
Method Details
-
ok
Returns aStatusData
indicating the operation has been validated by an application developer or operator to have completed successfully. -
unset
Returns the defaultStatusData
. -
error
Returns aStatusData
indicating an error occurred. -
create
Returns aStatusData
with the givencode
anddescription
. Ifdescription
isnull
, the returnedStatusData
does not have a description. -
getStatusCode
io.opentelemetry.api.trace.StatusCode getStatusCode()Returns the status code. -
getDescription
String getDescription()Returns the description of thisStatus
for human consumption.- Returns:
- the description of this
Status
.
-