Package io.sentry

Enum Class SpanStatus

All Implemented Interfaces:
JsonSerializable, Serializable, Comparable<SpanStatus>, Constable

public enum SpanStatus extends Enum<SpanStatus> implements JsonSerializable
  • Enum Constant Details

    • OK

      public static final SpanStatus OK
      Not an error, returned on success.
    • CANCELLED

      public static final SpanStatus CANCELLED
      The operation was cancelled, typically by the caller.
    • INTERNAL_ERROR

      public static final SpanStatus INTERNAL_ERROR
      Some invariants expected by the underlying system have been broken. This code is reserved for serious errors.
    • UNKNOWN

      public static final SpanStatus UNKNOWN
      An unknown error raised by APIs that don't return enough error information.
    • UNKNOWN_ERROR

      public static final SpanStatus UNKNOWN_ERROR
      An unknown error raised by APIs that don't return enough error information.
    • INVALID_ARGUMENT

      public static final SpanStatus INVALID_ARGUMENT
      The client specified an invalid argument.
    • DEADLINE_EXCEEDED

      public static final SpanStatus DEADLINE_EXCEEDED
      The deadline expired before the operation could succeed.
    • NOT_FOUND

      public static final SpanStatus NOT_FOUND
      Content was not found or request was denied for an entire class of users.
    • ALREADY_EXISTS

      public static final SpanStatus ALREADY_EXISTS
      The entity attempted to be created already exists
    • PERMISSION_DENIED

      public static final SpanStatus PERMISSION_DENIED
      The caller doesn't have permission to execute the specified operation.
    • RESOURCE_EXHAUSTED

      public static final SpanStatus RESOURCE_EXHAUSTED
      The resource has been exhausted e.g. per-user quota exhausted, file system out of space.
    • FAILED_PRECONDITION

      public static final SpanStatus FAILED_PRECONDITION
      The client shouldn't retry until the system state has been explicitly handled.
    • ABORTED

      public static final SpanStatus ABORTED
      The operation was aborted.
    • OUT_OF_RANGE

      public static final SpanStatus OUT_OF_RANGE
      The operation was attempted past the valid range e.g. seeking past the end of a file.
    • UNIMPLEMENTED

      public static final SpanStatus UNIMPLEMENTED
      The operation is not implemented or is not supported/enabled for this operation.
    • UNAVAILABLE

      public static final SpanStatus UNAVAILABLE
      The service is currently available e.g. as a transient condition.
    • DATA_LOSS

      public static final SpanStatus DATA_LOSS
      Unrecoverable data loss or corruption.
    • UNAUTHENTICATED

      public static final SpanStatus UNAUTHENTICATED
      The requester doesn't have valid authentication credentials for the operation.
  • Method Details

    • values

      public static SpanStatus[] 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

      public static SpanStatus valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromHttpStatusCode

      @Nullable public static @Nullable SpanStatus fromHttpStatusCode(int httpStatusCode)
      Creates SpanStatus 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)
      Creates SpanStatus from HTTP status code.
      Parameters:
      httpStatusCode - the http status code
      defaultStatus - 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 interface JsonSerializable
      Throws:
      IOException