Sha256: fe14b5b17cb3d4d2fdf66627e5cea9265fb75deaa1cfe1c241cbf1c972f3233b

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require 'new_relic/agent/transaction_state'

module NewRelic
  module Rack
    module TransactionReset
      RESET_KEY = "newrelic.transaction_reset".freeze

      def ensure_transaction_reset(env)
        return if env.has_key?(RESET_KEY)

        NewRelic::Agent::TransactionState.reset(nil)
        env[RESET_KEY] = true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.2.195 lib/new_relic/rack/transaction_reset.rb
newrelic_rpm-3.7.2.192 lib/new_relic/rack/transaction_reset.rb
newrelic_rpm-3.7.2.190.beta lib/new_relic/rack/transaction_reset.rb