lib/new_relic/agent/agent.rb in newrelic_rpm-5.7.0.350 vs lib/new_relic/agent/agent.rb in newrelic_rpm-6.0.0.351
- old
+ new
@@ -260,28 +260,28 @@
# Sets a thread local variable as to whether we should or
# should not record sql in the current thread. Returns the
# previous value, if there is one
def set_record_sql(should_record) #THREAD_LOCAL_ACCESS
- state = TransactionState.tl_get
+ state = Tracer.state
prev = state.record_sql
state.record_sql = should_record
prev.nil? || prev
end
# Push flag indicating whether we should be tracing in this
# thread. This uses a stack which allows us to disable tracing
# children of a transaction without affecting the tracing of
# the whole transaction
def push_trace_execution_flag(should_trace=false) #THREAD_LOCAL_ACCESS
- TransactionState.tl_get.push_traced(should_trace)
+ Tracer.state.push_traced(should_trace)
end
# Pop the current trace execution status. Restore trace execution status
# to what it was before we pushed the current flag.
def pop_trace_execution_flag #THREAD_LOCAL_ACCESS
- TransactionState.tl_get.pop_traced
+ Tracer.state.pop_traced
end
# Herein lies the corpse of the former 'start' method. May
# its unmatched flog score rest in pieces.
module Start
@@ -541,10 +541,10 @@
@custom_event_aggregator.reset!
@span_event_aggregator.reset!
@sql_sampler.reset!
if Agent.config[:clear_transaction_state_after_fork]
- TransactionState.tl_clear
+ Tracer.clear_state
end
end
# Clear out state for any objects that we know lock from our parents
# This is necessary for cases where we're in a forked child and Ruby