Sha256: e5bed9c5ea78aae41104fc225359e8c61ff1edf866a0885b40cda70b1bafb18a

Contents?: true

Size: 785 Bytes

Versions: 15

Compression:

Stored size: 785 Bytes

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

module NewRelic
  module Agent
    module Instrumentation
      module ActiveSupportLogger
        INSTRUMENTATION_NAME = NewRelic::Agent.base_name(name)

        # Mark @skip_instrumenting on any broadcasted loggers to instrument Rails.logger only
        def broadcast_with_tracing(logger)
          NewRelic::Agent.record_instrumentation_invocation(INSTRUMENTATION_NAME)

          NewRelic::Agent::Instrumentation::Logger.mark_skip_instrumenting(logger)
          yield
        rescue => error
          NewRelic::Agent.notice_error(error)
          raise
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb