Class: NewRelic::Agent::OpenTelemetry::Trace::Span
- Inherits:
-
OpenTelemetry::Trace::Span
- Object
- OpenTelemetry::Trace::Span
- NewRelic::Agent::OpenTelemetry::Trace::Span
- Defined in:
- lib/new_relic/agent/opentelemetry/trace/span.rb
Instance Attribute Summary collapse
-
#finishable ⇒ Object
Returns the value of attribute finishable.
Instance Method Summary collapse
- #add_attributes(attributes) ⇒ Object
- #finish(end_timestamp: nil) ⇒ Object
- #record_exception(exception, attributes: nil) ⇒ Object
- #set_attribute(key, value) ⇒ Object
Instance Attribute Details
#finishable ⇒ Object
Returns the value of attribute finishable.
10 11 12 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 10 def finishable @finishable end |
Instance Method Details
#add_attributes(attributes) ⇒ Object
20 21 22 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 20 def add_attributes(attributes) NewRelic::Agent.add_custom_span_attributes(attributes) end |
#finish(end_timestamp: nil) ⇒ Object
12 13 14 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 12 def finish(end_timestamp: nil) finishable&.finish end |
#record_exception(exception, attributes: nil) ⇒ Object
24 25 26 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 24 def record_exception(exception, attributes: nil) NewRelic::Agent.notice_error(exception, attributes: attributes) end |
#set_attribute(key, value) ⇒ Object
16 17 18 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 16 def set_attribute(key, value) NewRelic::Agent.add_custom_span_attributes(key => value) end |