class NewRelic::Agent::Instrumentation::ActiveStorageSubscriber
Constants
- METHOD_NAME_MAPPING
- PATTERN
Public Instance Methods
add_segment_params(segment, payload)
click to toggle source
# File lib/new_relic/agent/instrumentation/active_storage_subscriber.rb, line 11 def add_segment_params(segment, payload) segment.params[:key] = payload[:key] segment.params[:exist] = payload[:exist] if payload.key?(:exist) end
method_from_name(name)
click to toggle source
# File lib/new_relic/agent/instrumentation/active_storage_subscriber.rb, line 32 def method_from_name(name) METHOD_NAME_MAPPING[name] end
metric_name(name, payload)
click to toggle source
# File lib/new_relic/agent/instrumentation/active_storage_subscriber.rb, line 16 def metric_name(name, payload) service = payload[:service] method = method_from_name(name) "Ruby/ActiveStorage/#{service}Service/#{method}" end