class Aws::Telemetry::OTelSpan
within a trace.
OpenTelemetry-based {SpanBase}, represents a single operation
def add_attributes(attributes)
-
(self)
- returns itself
Parameters:
-
Hash{String
(Hash{String => String, Numeric, Boolean, Array
) -- => String, Numeric, Boolean, Array
def add_attributes(attributes) @span.add_attributes(attributes) end
def add_event(name, attributes: nil)
-
(self)
- returns itself
Parameters:
-
Hash{String
(Hash{String => String, Numeric, Boolean, Array
) -- => String, Numeric, Boolean, Array name
(String
) -- Name of the event
def add_event(name, attributes: nil) @span.add_event(name, attributes: attributes) end
def finish(end_timestamp: nil)
-
(self)
- returns itself
Parameters:
-
end_timestamp
(Time
) -- End timestamp for the span
def finish(end_timestamp: nil) @span.finish(end_timestamp: end_timestamp) end
def initialize(span)
def initialize(span) super() @span = span end
def record_exception(exception, attributes: nil)
-
(void)
-
Parameters:
-
Hash{String
(Hash{String => String, Numeric, Boolean, Array
) -- => String, Numeric, Boolean, Array exception
(Exception
) -- The exception to be recorded
def record_exception(exception, attributes: nil) @span.record_exception(exception, attributes: attributes) end
def set_attribute(key, value)
-
(self)
- returns itself
Parameters:
-
value
(String, Boolean, Numeric, Array
) -- -
key
(String
) --
def set_attribute(key, value) @span.set_attribute(key, value) end
def status=(status)
-
(void)
-
Parameters:
-
status
(Aws::Telemetry::Status
) -- The new status, which
def status=(status) @span.status = status end