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
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(segment:, transaction:) ⇒ Span
constructor
A new instance of Span.
Constructor Details
#initialize(segment:, transaction:) ⇒ Span
Returns a new instance of Span.
12 13 14 15 16 17 18 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 12 def initialize(segment:, transaction:) @context = ::OpenTelemetry::Trace::SpanContext.new( trace_id: transaction.trace_id, span_id: segment.guid, trace_flags: 1 ) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
10 11 12 |
# File 'lib/new_relic/agent/opentelemetry/trace/span.rb', line 10 def context @context end |