newrelic / newrelic-ruby-agent

New Relic RPM Ruby Agent
https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/introduction-new-relic-ruby/
Apache License 2.0
1.2k stars 599 forks source link

Reduce default arg object allocations in instrumentation #2806

Open kaylareopelle opened 2 months ago

kaylareopelle commented 2 months ago

While reviewing OpenSearch instrumentation, we discovered a few place where extra Hash allocations may occur in perform_request_with_tracing: https://github.com/newrelic/newrelic-ruby-agent/pull/2796#discussion_r1714400308

Audit the rest of our instrumentation to follow this pattern and reduce unnecessary object allocations.

workato-integration[bot] commented 2 months ago

https://new-relic.atlassian.net/browse/NR-302628