Class: Sentry::Rails::Tracing::ActionViewSubscriber

Inherits:
AbstractSubscriber show all
Defined in:
lib/sentry/rails/tracing/action_view_subscriber.rb

Constant Summary collapse

EVENT_NAMES =
["render_template.action_view"].freeze
SPAN_PREFIX =
"template."
SPAN_ORIGIN =
"auto.template.rails"

Class Method Summary collapse

Methods inherited from AbstractSubscriber

record_on_current_span, #subscribe_to_event, unsubscribe!

Class Method Details

.subscribe!Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/sentry/rails/tracing/action_view_subscriber.rb', line 13

def self.subscribe!
  subscribe_to_event(EVENT_NAMES) do |event_name, duration, payload|
    record_on_current_span(
      op: SPAN_PREFIX + event_name,
      origin: SPAN_ORIGIN,
      start_timestamp: payload[START_TIMESTAMP_NAME],
      description: payload[:identifier],
      duration: duration
    )
  end
end