Skip to content

Instantly share code, notes, and snippets.

@hissy
Last active November 11, 2015 01:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#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