Create a gist now

Instantly share code, notes, and snippets.

@hissy /app.php
Last active Nov 11, 2015

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