Skip to content

Commit

Permalink
Update argument defaults to reduce object alloc
Browse files Browse the repository at this point in the history
Use NewRelic::EMPTY_HASH for the params default
Make _opts default nil
  • Loading branch information
kaylareopelle committed Aug 12, 2024
1 parent 1e09324 commit 35b1090
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module OpenSearch
INSTANCE_METHOD_PATTERN = /:in (?:`|')(?:.+#)?([^']+)'\z/
INSTRUMENTATION_NAME = NewRelic::Agent.base_name(name)

def perform_request_with_tracing(_method, _path, params = {}, body = nil, _headers = nil, _opts = {}, &_block)
def perform_request_with_tracing(_method, _path, params = NewRelic::EMPTY_HASH, body = nil, _headers = nil, _opts = nil, &_block)
return yield unless NewRelic::Agent::Tracer.tracing_enabled?

segment = NewRelic::Agent::Tracer.start_datastore_segment(
Expand Down

0 comments on commit 35b1090

Please sign in to comment.