Package io.sentry

Enum SpanStatus

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABORTED
      The operation was aborted.
      ALREADY_EXISTS
      The entity attempted to be created already exists
      CANCELLED
      The operation was cancelled, typically by the caller.
      DATA_LOSS
      Unrecoverable data loss or corruption.
      DEADLINE_EXCEEDED
      The deadline expired before the operation could succeed.
      FAILED_PRECONDITION
      The client shouldn't retry until the system state has been explicitly handled.
      INTERNAL_ERROR
      Some invariants expected by the underlying system have been broken.
      INVALID_ARGUMENT
      The client specified an invalid argument.
      NOT_FOUND
      Content was not found or request was denied for an entire class of users.
      OK
      Not an error, returned on success.
      OUT_OF_RANGE
      The operation was attempted past the valid range e.g.
      PERMISSION_DENIED
      The caller doesn't have permission to execute the specified operation.
      RESOURCE_EXHAUSTED
      The resource has been exhausted e.g.
      UNAUTHENTICATED
      The requester doesn't have valid authentication credentials for the operation.
      UNAVAILABLE
      The service is currently available e.g.
      UNIMPLEMENTED
      The operation is not implemented or is not supported/enabled for this operation.
      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.
    • Enum Constant Detail

      • 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 Detail

      • values

        public static SpanStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SpanStatus c : SpanStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SpanStatus valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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 java.lang.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