Skip to content

Instantly share code, notes, and snippets.

@hissy
Last active November 11, 2015 01:35
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 hissy/2ece5b646614e8683188 to your computer and use it in GitHub Desktop.
Save hissy/2ece5b646614e8683188 to your computer and use it in GitHub Desktop.
#concrete5 #NewRelic Set actual transaction name with concrete5
<?php
/**
* Add below code into application/bootstrap/app.php
* concrete5 version 5.7+
*/
if (function_exists('newrelic_name_transaction')) {
$r = Request::getInstance();
newrelic_name_transaction($r->getPathInfo());
}
<?php
/**
* Add below code into config/site_post_autoload.php
* concrete5 version -5.6.x
*/
if (function_exists('newrelic_name_transaction')) {
$r = Request::get();
$path = $r->getRequestCollectionPath();
$path = ($path) ? $path : '/';
newrelic_name_transaction($path);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment