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.17.3 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.17.2 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.17.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.17.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.16.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.15.2 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.15.1 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.15.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.14.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.13.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.12.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.11.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.10.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.9.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.8.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.7.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.6.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.5.0 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.4.2 lib/sentry/rails/tracing/action_view_subscriber.rb
sentry-rails-5.4.1 lib/sentry/rails/tracing/action_view_subscriber.rb