[PHP] agent sampling


we have measured quite big performance gain (22%) if we disable our NR PHP agent. Is there any way how to enable and set up sampling? We do not need to measure all requests, 10% would be fine.

Thank you.

Hey there @david2 -

If I understand you correctly, you are looking to decrease the resource used by the PHP agent. You can’t currently sample requests, but you can control the level of detail that is monitored by the agent, which may help you out. I would suggest taking a look at these:

  • Disable transaction tracing
  • Disable slow sql
  • Disable newrelic.transaction_tracer.enabled

Note: also check the secondary setting pertaining to the level of detail - newrelic.transaction_tracer.detail
Leaving this enabled,causes a LOT of TT-related instrumentation to be spun up even though the primary feature is disabled. So make sure you set both: newrelic.transaction_tracer.enabled = falsenewrelic.transaction_tracer.detail = false

1 Like