Sha256: 1cde7e1de2bc5039544e5e2a3f49df25fca88f24fcaf449c27ff6c437a383813

Contents?: true

Size: 584 Bytes

Versions: 27

Compression:

Stored size: 584 Bytes

Contents

require "sentry/rails/tracing/abstract_subscriber"

module Sentry
  module Rails
    module Tracing
      class ActionViewSubscriber < AbstractSubscriber
        EVENT_NAMES = ["render_template.action_view"].freeze
        SPAN_PREFIX = "template.".freeze

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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
sentry-rails-5.4.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.3.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.3.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.2.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.2.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.1.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.1.0 lib/sentry/rails/tracing/action_view_subscriber.rb