Sha256: ab642f74c3242d731e9ba9dff493a84af7256f5d77cf59a5f01144973b396460

Contents?: true

Size: 870 Bytes

Versions: 38

Compression:

Stored size: 870 Bytes

Contents

# encoding: utf-8

module OneApm
  module Agent
    class Agent
      module Helpers

        def obfuscator
          @obfuscator ||= lambda {|sql| OneApm::Agent::Database.default_sql_obfuscator(sql) }
        end

        def set_record_sql(should_record)
          state = TransactionState.tl_get
          prev = state.record_sql
          state.record_sql = should_record
          prev.nil? || prev
        end

        def set_record_tt(should_record)
          state = TransactionState.tl_get
          prev = state.record_tt
          state.record_tt = should_record
          prev.nil? || prev
        end

        def push_trace_execution_flag(should_trace=false)
          TransactionState.tl_get.push_traced(should_trace)
        end

        def pop_trace_execution_flag
          TransactionState.tl_get.pop_traced
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
oneapm_rpm-1.2.9.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.8 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.8.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.7 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.7.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.6 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.6.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.5 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.5.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.4 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.4.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.3 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.3.rc2 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.2 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.2.rc lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.1.rc lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.0 lib/one_apm/agent/agent/helpers.rb