lib/new_relic/agent/instrumentation/redis.rb in newrelic_rpm-6.9.0.363 vs lib/new_relic/agent/instrumentation/redis.rb in newrelic_rpm-6.10.0.364
- old
+ new
@@ -69,11 +69,13 @@
port_path_or_id: port_path_or_id,
database_name: db
)
begin
segment.notice_nosql_statement(statement) if statement
- call_without_new_relic(*args, &block)
+ NewRelic::Agent::Tracer.capture_segment_error segment do
+ call_without_new_relic(*args, &block)
+ end
ensure
segment.finish if segment
end
end
@@ -94,11 +96,13 @@
port_path_or_id: port_path_or_id,
database_name: db
)
begin
segment.notice_nosql_statement(statement)
- call_pipeline_without_new_relic(*args, &block)
+ NewRelic::Agent::Tracer.capture_segment_error segment do
+ call_pipeline_without_new_relic(*args, &block)
+ end
ensure
segment.finish if segment
end
end
@@ -115,10 +119,12 @@
port_path_or_id: port_path_or_id,
database_name: db
)
begin
- connect_without_new_relic(*args, &block)
+ NewRelic::Agent::Tracer.capture_segment_error segment do
+ connect_without_new_relic(*args, &block)
+ end
ensure
segment.finish if segment
end
end
end