Package io.opentelemetry.sdk.trace.data
Interface StatusData
-
public interface StatusData
Defines the status of aSpan
by providing a standardStatusCode
in 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 StatusData
create(io.opentelemetry.api.trace.StatusCode code, String description)
static StatusData
error()
Returns aStatusData
indicating an error occurred.String
getDescription()
Returns the description of thisStatus
for human consumption.io.opentelemetry.api.trace.StatusCode
getStatusCode()
Returns the status code.default boolean
isOk()
Deprecated.ComparegetStatusCode()
withStatusCode.ERROR
default boolean
isUnset()
Deprecated.ComparegetStatusCode()
withStatusCode.UNSET
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 Detail
-
ok
static StatusData ok()
Returns aStatusData
indicating 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 aStatusData
indicating an error occurred.
-
create
static StatusData create(io.opentelemetry.api.trace.StatusCode code, @Nullable String description)
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
@Nullable String getDescription()
Returns the description of thisStatus
for human consumption.- Returns:
- the description of this
Status
.
-
isUnset
@Deprecated default boolean isUnset()
Deprecated.ComparegetStatusCode()
withStatusCode.UNSET
Returnstrue
if thisStatus
is UNSET, i.e., not an error.- Returns:
true
if thisStatus
is UNSET.
-
isOk
@Deprecated default boolean isOk()
Deprecated.ComparegetStatusCode()
withStatusCode.ERROR
Returnstrue
if thisStatus
is ok, i.e., status is not set, or has been overridden to be ok by an operator.- Returns:
true
if thisStatus
is OK or UNSET.
-
-