Limiting or disabling Agent SDK settings

BETA

The New Relic Agent SDK is designed to have a minimal impact on your system's performance. However, in addition to the default settings, you can use these controls to limit or disable data collection.

If you want to... Use this setting...
Disable data collection during a transaction
newrelic_enable_instrumentation(0);

Note: If you are running a web server that spawns off new processes per transaction, you may need to call this for every transaction.

Shut down the agent
  • If running in embedded-mode:

    newrelic_request_shutdown(“reason for shutting down…”);
  • If running in daemon mode:

    Stop the newrelic-collector-client-daemon process.

Configure transaction trace thresholds
newrelic_transaction_set_threshold(transaction_id, 5000);

Note: If you are running a web server that spawns off new processes per transaction, you may need to call this for every transaction.

Configure the number of trace segments collected in a transaction trace

// Only collect up to 50 trace segments
newrelic_transaction_set_max_trace_segments(transaction_id, 50);

Note: If you are running a web server that spawns off new processes per transaction, you may need to call this for every transaction.

For more help

Additional documentation resources include:

Troubleshoot and ask questions about the Agent SDK in New Relic's Online Technical Community!

If you need additional help, get support at support.newrelic.com.