Class: Aws::Telemetry::SpanStatus
- Inherits:
-
Object
- Object
- Aws::Telemetry::SpanStatus
- Defined in:
- gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb
Overview
Represents the status of a finished span.
Constant Summary collapse
- OK =
The operation completed successfully.
0
- UNSET =
The default status.
1
- ERROR =
An error.
2
Instance Attribute Summary collapse
-
#code ⇒ Integer
readonly
Code.
-
#description ⇒ String
readonly
Description.
Class Method Summary collapse
-
.error(description = '') ⇒ SpanStatus
Returns a newly created SpanStatus with code,
ERROR
and an optional description. -
.ok(description = '') ⇒ SpanStatus
Returns a newly created SpanStatus with code,
OK
and an optional description. -
.unset(description = '') ⇒ SpanStatus
Returns a newly created SpanStatus with code,
UNSET
and an optional description.
Instance Method Summary collapse
-
#initialize(code, description: '') ⇒ SpanStatus
constructor
A new instance of SpanStatus.
Constructor Details
#initialize(code, description: '') ⇒ SpanStatus
Returns a new instance of SpanStatus.
38 39 40 41 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 38 def initialize(code, description: '') @code = code @description = description end |
Instance Attribute Details
#code ⇒ Integer (readonly)
Returns code.
44 45 46 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 44 def code @code end |
#description ⇒ String (readonly)
Returns description.
47 48 49 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 47 def description @description end |
Class Method Details
.error(description = '') ⇒ SpanStatus
Returns a newly created Aws::Telemetry::SpanStatus with code, ERROR
and an optional description.
33 34 35 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 33 def error(description = '') new(ERROR, description: description) end |
.ok(description = '') ⇒ SpanStatus
Returns a newly created Aws::Telemetry::SpanStatus with code, OK
and an optional description.
24 25 26 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 24 def ok(description = '') new(OK, description: description) end |
.unset(description = '') ⇒ SpanStatus
Returns a newly created Aws::Telemetry::SpanStatus with code, UNSET
and an optional description.
15 16 17 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/span_status.rb', line 15 def unset(description = '') new(UNSET, description: description) end |