Class: Aws::Telemetry::SpanBase

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/telemetry/base.rb

Overview

Base for Span classes.

Direct Known Subclasses

NoOpSpan, OTelSpan

Instance Method Summary collapse

Instance Method Details

#add_attributes(attributes) ⇒ self

Add attributes.

Parameters:

  • Values must be non-nil and (array of) string, boolean or numeric type. Array values must not contain nil elements and all elements must be of the same basic type (string, numeric, boolean)

Returns:

  • returns itself

Raises:



100
101
102
# File 'lib/aws-sdk-core/telemetry/base.rb', line 100

def add_attributes(attributes)
  raise NotImplementedError
end

#add_event(name, attributes: nil) ⇒ self

Add event to a Span.

Parameters:

  • Name of the event

  • (defaults to: nil)

    Values must be non-nil and (array of) string, boolean or numeric type. Array values must not contain nil elements and all elements must be of the same basic type (string, numeric, boolean)

Returns:

  • returns itself

Raises:



113
114
115
# File 'lib/aws-sdk-core/telemetry/base.rb', line 113

def add_event(name, attributes: nil)
  raise NotImplementedError
end

#finish(end_timestamp: nil) ⇒ self

Finishes the Span.

Parameters:

  • (defaults to: nil)

    End timestamp for the span.

Returns:

  • returns itself

Raises:



130
131
132
# File 'lib/aws-sdk-core/telemetry/base.rb', line 130

def finish(end_timestamp: nil)
  raise NotImplementedError
end

#record_exception(exception, attributes: nil) ⇒ void

This method returns an undefined value.

Record an exception during the execution of this span. Multiple exceptions can be recorded on a span.

Parameters:

  • The exception to be recorded

  • (defaults to: nil)

    One or more key:value pairs, where the keys must be strings and the values may be (array of) string, boolean or numeric type.

Raises:



143
144
145
# File 'lib/aws-sdk-core/telemetry/base.rb', line 143

def record_exception(exception, attributes: nil)
  raise NotImplementedError
end

#set_attribute(key, value) ⇒ self Also known as: []=

Set attribute.

Parameters:

  • Value must be non-nil and (array of) string, boolean or numeric type. Array values must not contain nil elements and all elements must be of the same basic type (string, numeric, boolean)

Returns:

  • returns itself

Raises:



87
88
89
# File 'lib/aws-sdk-core/telemetry/base.rb', line 87

def set_attribute(key, value)
  raise NotImplementedError
end

#status=(status) ⇒ void

This method returns an undefined value.

Sets the Span status.

Parameters:

  • The new status, which overrides the default Span status, which is OK

Raises:



122
123
124
# File 'lib/aws-sdk-core/telemetry/base.rb', line 122

def status=(status)
  raise NotImplementedError
end