Skip to content

Instantly share code, notes, and snippets.

@z4y4ts
Last active July 7, 2016 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z4y4ts/43ed522cd8ad293f80997e9ad562f399 to your computer and use it in GitHub Desktop.
Save z4y4ts/43ed522cd8ad293f80997e9ad562f399 to your computer and use it in GitHub Desktop.
Disabling NewRelic APM for AMP pages
<?php
add_action( 'pre_amp_render_post', 'xyz_amp_add_custom_actions' );
function xyz_amp_add_custom_actions() {
if (extension_loaded('newrelic')) {
newrelic_disable_autorum();
newrelic_ignore_transaction();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment