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.4.2 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.4.1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.4.0 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.7 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.6 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.5 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.4 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.3 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.2 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.0 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/agent/agent/helpers.rb
oneapm_rpm-1.2.9 lib/one_apm/agent/agent/helpers.rb