lib/new_relic/agent/instrumentation/redis.rb in newrelic_rpm-4.6.0.338 vs lib/new_relic/agent/instrumentation/redis.rb in newrelic_rpm-4.7.0.339
- old
+ new
@@ -60,12 +60,17 @@
statement = ::NewRelic::Agent::Datastores::Redis.format_command(args[0])
hostname = NewRelic::Agent::Instrumentation::Redis.host_for(self)
port_path_or_id = NewRelic::Agent::Instrumentation::Redis.port_path_or_id_for(self)
- segment = NewRelic::Agent::Transaction.start_datastore_segment(NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
- operation, nil, hostname, port_path_or_id, db)
+ segment = NewRelic::Agent::Transaction.start_datastore_segment(
+ product: NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
+ operation: operation,
+ host: hostname,
+ 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)
ensure
segment.finish if segment
@@ -80,12 +85,17 @@
statement = ::NewRelic::Agent::Datastores::Redis.format_pipeline_commands(pipeline.commands)
hostname = NewRelic::Agent::Instrumentation::Redis.host_for(self)
port_path_or_id = NewRelic::Agent::Instrumentation::Redis.port_path_or_id_for(self)
- segment = NewRelic::Agent::Transaction.start_datastore_segment(NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
- operation, nil, hostname, port_path_or_id, db)
+ segment = NewRelic::Agent::Transaction.start_datastore_segment(
+ product: NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
+ operation: operation,
+ host: hostname,
+ port_path_or_id: port_path_or_id,
+ database_name: db
+ )
begin
segment.notice_nosql_statement(statement)
call_pipeline_without_new_relic(*args, &block)
ensure
segment.finish if segment
@@ -96,11 +106,16 @@
def connect(*args, &block)
hostname = NewRelic::Agent::Instrumentation::Redis.host_for(self)
port_path_or_id = NewRelic::Agent::Instrumentation::Redis.port_path_or_id_for(self)
- segment = NewRelic::Agent::Transaction.start_datastore_segment(NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
- NewRelic::Agent::Datastores::Redis::CONNECT, nil, hostname, port_path_or_id, db)
+ segment = NewRelic::Agent::Transaction.start_datastore_segment(
+ product: NewRelic::Agent::Datastores::Redis::PRODUCT_NAME,
+ operation: NewRelic::Agent::Datastores::Redis::CONNECT,
+ host: hostname,
+ port_path_or_id: port_path_or_id,
+ database_name: db
+ )
begin
connect_without_new_relic(*args, &block)
ensure
segment.finish if segment