lib/one_apm/inst/nosql/mongo2.rb in oneapm_rpm-1.3.0 vs lib/one_apm/inst/nosql/mongo2.rb in oneapm_rpm-1.3.1.rc1
- old
+ new
@@ -62,16 +62,16 @@
def one_apm_notice_sql(state, event, status, duration)
stack = state.traced_method_stack
base, *other_metrics = mertircs(event)
started_time = Time.now.to_f
- frame = stack.push_frame(state, :mongo_tracer, started_time)
+ frame = stack.push_frame(state, :mongo_tracer, started_time - duration)
builder = state.transaction_sample_builder
format_sql = OneApm::Agent::Datastore::Mongo::CommandFormatter.format_sql(event, status)
OneApm::Manager.agent.transaction_sampler.send(:notice_extra_data, builder, format_sql, duration, :sql)
- stack.pop_frame(state, frame, base, started_time + duration)
+ stack.pop_frame(state, frame, base, started_time)
end
def one_apm_notice_statement(event, status, duration)
statement = OneApm::Agent::Datastore::Mongo::CommandFormatter.format(event, status)
if statement
\ No newline at end of file