module NewRelic::ThreadLocalStorage
Public Class Methods
[](key)
click to toggle source
# File lib/new_relic/thread_local_storage.rb, line 23 def self.[](key) get(::Thread.current, key) end
[]=(key, value)
click to toggle source
# File lib/new_relic/thread_local_storage.rb, line 27 def self.[]=(key, value) set(::Thread.current, key, value) end
get(thread, key)
click to toggle source
# File lib/new_relic/thread_local_storage.rb, line 7 def self.get(thread, key) if Agent.config[:thread_local_tracer_state] thread.thread_variable_get(key) else thread[key] end end
set(thread, key, value)
click to toggle source
# File lib/new_relic/thread_local_storage.rb, line 15 def self.set(thread, key, value) if Agent.config[:thread_local_tracer_state] thread.thread_variable_set(key, value) else thread[key] = value end end