kunstmaan/newrelicbundle

This package is abandoned and no longer maintained. The author suggests using the EkinoNewRelicBundle package instead.

THIS REPO IS DEPRECATED: replaced by EkinoNewRelicBundle | This bundle adds support for NewRelic's named transactions to you Symfony2 project so that every controller and action is tracked separately and not everything under app.php. This also means you can start using the Key Transactions feature o

v2.4.0 2013-12-09 16:47 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:22:11 UTC


README

IMPORTANT: We recommend that you no longer use this bundle. Since it's inception EkinoNewRelicBundle has appeared and is better maintained and has more features.

KunstmaanNewRelicBundle

Build Status Total Downloads Latest Stable Version Analytics

Are you tired to see /app.php as transaction in your NewRelic account? Good new then, the guys at NewRelic are planning to add Symfony2 support to their PHP extension but since there is no timeline for the release yet, i created this very small (4LOC) bundle that sets the transaction name to the controller and action. For example, you will now see /WelcomeController::indexAction. This also means you can start using the Key Transactions feature of NewRelic.

Installation?

Composer

composer.json

    "require": {
        "kunstmaan/newrelicbundle": "*"
    },

AppKernel.php:

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Kunstmaan\NewRelicBundle\KunstmaanNewRelicBundle(),
            // ...
        );

deps

deps:

[KunstmaanNewRelicBundle]
    git=https://github.com/Kunstmaan/KunstmaanNewRelicBundle.git
    target=/bundles/Kunstmaan/NewRelicBundle

AppKernel:

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Kunstmaan\NewRelicBundle\KunstmaanNewRelicBundle(),
            // ...
        );

autoload.php

$loader->registerNamespaces(array(
    // ...
    'Kunstmaan'                         => __DIR__.'/../vendor/bundles',
    // ...
));

Multiple environments support

To enable NewRelic for a specific environment, add these lines to the config.yml file for the environment (ie. config_prod.yml) :

kunstmaan_new_relic:
    enabled: true

Note that NewRelic is disabled by default.