Package io.sentry
Enum Class SpanStatus
- All Implemented Interfaces:
JsonSerializable
,Serializable
,Comparable<SpanStatus>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe operation was aborted.The entity attempted to be created already existsThe operation was cancelled, typically by the caller.Unrecoverable data loss or corruption.The deadline expired before the operation could succeed.The client shouldn't retry until the system state has been explicitly handled.Some invariants expected by the underlying system have been broken.The client specified an invalid argument.Content was not found or request was denied for an entire class of users.Not an error, returned on success.The operation was attempted past the valid range e.g.The caller doesn't have permission to execute the specified operation.The resource has been exhausted e.g.The requester doesn't have valid authentication credentials for the operation.The service is currently available e.g.The operation is not implemented or is not supported/enabled for this operation.An unknown error raised by APIs that don't return enough error information.An unknown error raised by APIs that don't return enough error information. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable SpanStatus
fromHttpStatusCode
(int httpStatusCode) CreatesSpanStatus
from HTTP status code.static @NotNull SpanStatus
fromHttpStatusCode
(@Nullable Integer httpStatusCode, @NotNull SpanStatus defaultStatus) CreatesSpanStatus
from HTTP status code.void
serialize
(@NotNull ObjectWriter writer, @NotNull ILogger logger) static SpanStatus
Returns the enum constant of this class with the specified name.static SpanStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
Not an error, returned on success. -
CANCELLED
The operation was cancelled, typically by the caller. -
INTERNAL_ERROR
Some invariants expected by the underlying system have been broken. This code is reserved for serious errors. -
UNKNOWN
An unknown error raised by APIs that don't return enough error information. -
UNKNOWN_ERROR
An unknown error raised by APIs that don't return enough error information. -
INVALID_ARGUMENT
The client specified an invalid argument. -
DEADLINE_EXCEEDED
The deadline expired before the operation could succeed. -
NOT_FOUND
Content was not found or request was denied for an entire class of users. -
ALREADY_EXISTS
The entity attempted to be created already exists -
PERMISSION_DENIED
The caller doesn't have permission to execute the specified operation. -
RESOURCE_EXHAUSTED
The resource has been exhausted e.g. per-user quota exhausted, file system out of space. -
FAILED_PRECONDITION
The client shouldn't retry until the system state has been explicitly handled. -
ABORTED
The operation was aborted. -
OUT_OF_RANGE
The operation was attempted past the valid range e.g. seeking past the end of a file. -
UNIMPLEMENTED
The operation is not implemented or is not supported/enabled for this operation. -
UNAVAILABLE
The service is currently available e.g. as a transient condition. -
DATA_LOSS
Unrecoverable data loss or corruption. -
UNAUTHENTICATED
The requester doesn't have valid authentication credentials for the operation.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromHttpStatusCode
CreatesSpanStatus
from HTTP status code.- Parameters:
httpStatusCode
- the http status code- Returns:
- span status equivalent of http status code or null if not found
-
fromHttpStatusCode
@NotNull public static @NotNull SpanStatus fromHttpStatusCode(@Nullable @Nullable Integer httpStatusCode, @NotNull @NotNull SpanStatus defaultStatus) CreatesSpanStatus
from HTTP status code.- Parameters:
httpStatusCode
- the http status codedefaultStatus
- the default SpanStatus- Returns:
- span status equivalent of http status code or defaultStatus if not found
-
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serialize
in interfaceJsonSerializable
- Throws:
IOException
-