Sha256: 57dd2c326a964d189fdc5b8c68986f9d28347e84d399f1d1a805aa00df6c25af

Contents?: true

Size: 703 Bytes

Versions: 4

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

module Mnemosyne
  module Probes
    module ActionView
      module RenderTemplate
        class Probe < ::Mnemosyne::Probe
          subscribe 'render_template.action_view'

          # rubocop:disable Metrics/ParameterLists
          def call(trace, _name, start, finish, _id, payload)
            start  = ::Mnemosyne::Clock.to_tick(start)
            finish = ::Mnemosyne::Clock.to_tick(finish)

            span = ::Mnemosyne::Span.new 'view.render.template.rails',
              start: start, finish: finish, meta: payload

            trace << span
          end
        end
      end
    end

    register nil, nil, ActionView::RenderTemplate::Probe.new
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mnemosyne-ruby-1.0.1 lib/mnemosyne/probes/action_view/render_template.rb
mnemosyne-ruby-1.0.0 lib/mnemosyne/probes/action_view/render_template.rb
mnemosyne-ruby-0.2.0 lib/mnemosyne/probes/action_view/render_template.rb
mnemosyne-ruby-0.1.0 lib/mnemosyne/probes/action_view/render_template.rb