Class: Aws::Telemetry::SpanStatus

Inherits:
Object
  • Object
show all
Defined in:
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, description: '') ⇒ SpanStatus

Returns a new instance of SpanStatus.



38
39
40
41
# File 'lib/aws-sdk-core/telemetry/span_status.rb', line 38

def initialize(code, description: '')
  @code = code
  @description = description
end

Instance Attribute Details

#codeInteger (readonly)

Returns code.

Returns:

  • (Integer)

    code



44
45
46
# File 'lib/aws-sdk-core/telemetry/span_status.rb', line 44

def code
  @code
end

#descriptionString (readonly)

Returns description.

Returns:

  • (String)

    description



47
48
49
# File '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.

Parameters:

  • description (optional String) (defaults to: '')

Returns:



33
34
35
# File '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.

Parameters:

  • description (optional String) (defaults to: '')

Returns:



24
25
26
# File '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.

Parameters:

  • description (optional String) (defaults to: '')

Returns:



15
16
17
# File 'lib/aws-sdk-core/telemetry/span_status.rb', line 15

def unset(description = '')
  new(UNSET, description: description)
end