Module: Instana::Instrumentation::ActionCableConnection

Defined in:
lib/instana/instrumentation/action_cable.rb

Instance Method Summary collapse

Instance Method Details

#instana_trace_contextObject



7
8
9
# File 'lib/instana/instrumentation/action_cable.rb', line 7

def instana_trace_context
  @instana_trace_context
end

#processObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/instana/instrumentation/action_cable.rb', line 11

def process
  # Wrapped in non_recording_span by the channel callbacks below, so it
  # must be a SpanContext.
  @instana_trace_context ||= if ::Instana.tracer.tracing?
                               ::Instana.tracer.current_span.context
                             else
                               OpenTelemetry::Trace::SpanContext::INVALID
                             end
  super
end