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:

  • attributes (Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>})

    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:

  • (self)

    returns itself

Raises:

  • (NotImplementedError)


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 (String)

    Name of the event

  • attributes (Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}) (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:

  • (self)

    returns itself

Raises:

  • (NotImplementedError)


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:

  • end_timestamp (Time) (defaults to: nil)

    End timestamp for the span.

Returns:

  • (self)

    returns itself

Raises:

  • (NotImplementedError)


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:

  • exception (Exception)

    The exception to be recorded

  • attributes (Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}) (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:

  • (NotImplementedError)


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:

  • key (String)
  • value (String, Boolean, Numeric, Array<String, Numeric, Boolean>)

    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:

  • (self)

    returns itself

Raises:

  • (NotImplementedError)


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:

Raises:

  • (NotImplementedError)


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

def status=(status)
  raise NotImplementedError
end