class NewRelic::Agent::Instrumentation::ActiveSupportSubscriber

Constants

METHOD_NAME_MAPPING
PATTERN

Public Instance Methods

add_segment_params(segment, payload) click to toggle source
# File lib/new_relic/agent/instrumentation/active_support_subscriber.rb, line 11
def add_segment_params(segment, payload)
  segment.params[:key] = payload[:key]
  segment.params[:store] = payload[:store]
  segment.params[:hit] = payload[:hit] if payload.key?(:hit)
  segment.params[:super_operation] = payload[:super_operation] if payload.key?(:super_operation)
  segment
end
method_from_name(name) click to toggle source
# File lib/new_relic/agent/instrumentation/active_support_subscriber.rb, line 35
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_support_subscriber.rb, line 19
def metric_name(name, payload)
  store = payload[:store]
  method = method_from_name(name)
  "Ruby/ActiveSupport#{"/#{store}" if store}/#{method}"
end