Package io.opentelemetry.sdk.trace.data
Interface SpanData.Status
-
- Enclosing interface:
- SpanData
public static interface SpanData.Status
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 Modifier and Type Method Description static SpanData.Status
create(io.opentelemetry.api.trace.StatusCode code, String description)
static SpanData.Status
error()
Returns aSpanData.Status
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()
Returnstrue
if thisStatus
is ok, i.e., status is not set, or has been overridden to be ok by an operator.default boolean
isUnset()
Returnstrue
if thisStatus
is UNSET, i.e., not an error.static SpanData.Status
ok()
Returns aSpanData.Status
indicating the operation has been validated by an application developer or operator to have completed successfully.static SpanData.Status
unset()
Returns the defaultSpanData.Status
.
-
-
-
Method Detail
-
ok
static SpanData.Status ok()
Returns aSpanData.Status
indicating the operation has been validated by an application developer or operator to have completed successfully.
-
unset
static SpanData.Status unset()
Returns the defaultSpanData.Status
.
-
error
static SpanData.Status error()
Returns aSpanData.Status
indicating an error occurred.
-
create
static SpanData.Status create(io.opentelemetry.api.trace.StatusCode code, @Nullable String description)
Returns aSpanData.Status
with the givencode
anddescription
. Ifdescription
isnull
, the returnedSpanData.Status
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
default boolean isUnset()
Returnstrue
if thisStatus
is UNSET, i.e., not an error.- Returns:
true
if thisStatus
is UNSET.
-
isOk
default boolean isOk()
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.
-
-