lib/sequel/plugins/oneapm_instrumentation.rb in oneapm_rpm-1.3.7 vs lib/sequel/plugins/oneapm_instrumentation.rb in oneapm_rpm-1.4.0

- old
+ new

@@ -10,11 +10,12 @@ module MethodTracer def make_tracer_method( opname, options ) body = Proc.new do |*args, &block| classname = self.is_a?( Class ) ? self.name : self.class.name - metric = "Database/%s/%s" % [ classname, opname ] - trace_execution_scoped( metric, options ) do + op_name = OneApm::Agent::Instrumentation::ActiveRecordHelper.rename_for(opname) + metrics = OneApm::Agent::Instrumentation::ActiveRecordHelper.metric_for(classname, op_name).compact + trace_execution_scoped( metrics, options ) do super( *args, &block ) end end return body