New Relic collects and reports information on web browser transactions and non-web transactions, such as background tasks. New Relic normally produces complete information right out of the box without any need to modify your application code. However, if New Relic does not support your framework, you may need to add custom instrumentation.
Custom instrumentation is also useful to add detail to your transaction traces, to block instrumentation on transactions you don't want instrumented, or if New Relic is simply not picking up a part of your code that you want to instrument.
For maximum visibility into your application, ensure that the
newrelic.transaction_tracer.detail parameter is set to
1 (default). This will cause all PHP functions to be timed, thus reducing greatly the amount of "uninstrumented time" in a transaction trace.
Beyond that setting, agent API calls can control transactions and add custom instrumentation:
Specify a particular method you want to instrument.
Stop timing a transaction, but continue instrumenting it. Useful for streaming data.
Do not instrument a transaction at all.
Customize the name of a transaction when the default name is not useful.
Record an error message with a stack trace.
Manually end the current transaction, then start a new transaction. Useful for queue managers, or other scripts that create numerous "children."
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.