class Atatus::Spies::TiltSpy

@api private

Constants

TYPE

Public Instance Methods

install() click to toggle source
# File lib/atatus/spies/tilt.rb, line 27
def install
  if defined?(::Tilt) && defined?(::Tilt::Template)

    ::Tilt::Template.class_eval do
      alias render_without_apm render

      def render(*args, &block)
        name = options[:__atatus_template_name] || 'Unknown template'

        Atatus.with_span name, TYPE do
          render_without_apm(*args, &block)
        end
      end
    end

  end
end
render(*args, &block) click to toggle source
# File lib/atatus/spies/tilt.rb, line 33
def render(*args, &block)
  name = options[:__atatus_template_name] || 'Unknown template'

  Atatus.with_span name, TYPE do
    render_without_apm(*args, &block)
  end
end