Class: OpenTelemetry::Trace::Status
- Inherits:
-
Object
- Object
- OpenTelemetry::Trace::Status
- Extended by:
- Util::HttpToStatus
- Defined in:
- lib/opentelemetry/trace/status.rb
Overview
Status represents the status of a finished Span. It is composed of a canonical code in conjunction with an optional descriptive message.
Constant Summary collapse
- OK =
The operation completed successfully.
0- CANCELLED =
The operation was cancelled (typically by the caller).
1- UNKNOWN_ERROR =
An unknown error.
2- INVALID_ARGUMENT =
Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system.
3- DEADLINE_EXCEEDED =
Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully.
4- NOT_FOUND =
Some requested entity (e.g., file or directory) was not found.
5- ALREADY_EXISTS =
Some entity that we attempted to create (e.g., file or directory) already exists.
6- PERMISSION_DENIED =
The caller does not have permission to execute the specified operation. PERMISSION_DENIED must not be used if the caller cannot be identified (use UNAUTHENTICATED instead for those errors).
7- RESOURCE_EXHAUSTED =
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
8- FAILED_PRECONDITION =
Operation was rejected because the system is not in a state required for the operation's execution.
9- ABORTED =
The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
10- OUT_OF_RANGE =
Operation was attempted past the valid range. E.g., seeking or reading past end of file. Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes.
11- UNIMPLEMENTED =
Operation is not implemented or not supported/enabled in this service.
12- INTERNAL_ERROR =
Internal errors. Means some invariants expected by underlying system has been broken.
13- UNAVAILABLE =
The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
14- DATA_LOSS =
Unrecoverable data loss or corruption.
15- UNAUTHENTICATED =
The request does not have valid authentication credentials for the operation.
16
Instance Attribute Summary collapse
-
#canonical_code ⇒ Integer
readonly
Retrieve the canonical code of this Status.
-
#description ⇒ String
readonly
Retrieve the description of this Status.
Instance Method Summary collapse
-
#initialize(canonical_code, description: '') ⇒ Status
constructor
Initialize a Status.
-
#ok? ⇒ Boolean
Returns false if this Status represents an error, else returns true.
Methods included from Util::HttpToStatus
Constructor Details
#initialize(canonical_code, description: '') ⇒ Status
Initialize a Status.
31 32 33 34 |
# File 'lib/opentelemetry/trace/status.rb', line 31 def initialize(canonical_code, description: '') @canonical_code = canonical_code @description = description end |
Instance Attribute Details
#canonical_code ⇒ Integer (readonly)
Retrieve the canonical code of this Status.
20 21 22 |
# File 'lib/opentelemetry/trace/status.rb', line 20 def canonical_code @canonical_code end |
#description ⇒ String (readonly)
Retrieve the description of this Status.
25 26 27 |
# File 'lib/opentelemetry/trace/status.rb', line 25 def description @description end |
Instance Method Details
#ok? ⇒ Boolean
Returns false if this OpenTelemetry::Trace::Status represents an error, else returns true.
39 40 41 |
# File 'lib/opentelemetry/trace/status.rb', line 39 def ok? @canonical_code == OK end |