2017 © Pedro Peláez
 

library slim-newrelic

image

nicolas-cajelli/slim-newrelic

  • Thursday, August 24, 2017
  • by nicolas-cajelli
  • Repository
  • 0 Watchers
  • 1 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Slim NewRelic

Newrelic implementation for slim framework, (*1)

Install

composer require nicolas-cajelli/slim-newrelic

Setup


$config['responseHandlers'] = function(ContainerInterface $c) { return [ $c->get(BadRequestJsonResponseHandler::class), $c->get(NewrelicResponseHandler::class), ]; }; $app->add(NewRelicTransactionMiddleware::class);

Configure (optional)

If you want to define your own appName + licenseKey:, (*2)

$config['settings']  = [
    // ...
    'newRelic' => [
        'licenseKey' => 'your-license',
        'appName' => 'your-app'
    ]
    // ...
];

Advanced

  • Provide your own implementations for naming and/or decorators
$config[NewRelicTransactionMiddleware::class] = function(ContainerInterface $c) {
    $middleware = new NewRelicTransactionMiddleware($c);
    $middleware->addTransactionDecorator(CustomDecorator::class);
    $middleware->setTransactionNaming(CustomNamingPolicy::class);
    return $middleware;
};

The Versions

24/08 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

slim newrelic

24/08 2017

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

slim newrelic