• EnglishEspañol日本語한국어Português
  • Log inStart now

PHP custom instrumentation

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.

Ensure all PHP functions are timed

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.

Use the agent API to control transactions

Beyond that setting, agent API calls can control transactions and add custom instrumentation:

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.