Method: NewRelic::Agent::AttributeFilter#setup_key_cache
- Defined in:
- lib/new_relic/agent/attribute_filter.rb
permalink #setup_key_cache ⇒ Object
Note the key_cache is a global cache, accessible by multiple threads, but is intentionally left unsynchronized for liveness. Writes will always involve writing the same boolean value for each key, so there is no worry of one value clobbering another. For reads, if a value hasn’t been written to the cache yet, the worst that will happen is that it will run through the filter rules again. Both reads and writes will become eventually consistent.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/new_relic/agent/attribute_filter.rb', line 152 def setup_key_cache destinations = [ DST_TRANSACTION_EVENTS, DST_TRANSACTION_TRACER, DST_ERROR_COLLECTOR, DST_BROWSER_MONITORING, DST_SPAN_EVENTS, DST_TRANSACTION_SEGMENTS, DST_ALL ] @key_cache = destinations.inject({}) do |memo, destination| memo[destination] = {} memo end end |