Download the PHP package anjalirana/newrelic-bundle without Composer
On this page you can find all versions of the php package anjalirana/newrelic-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anjalirana/newrelic-bundle
More information about anjalirana/newrelic-bundle
Files in anjalirana/newrelic-bundle
Package newrelic-bundle
Short Description Integrate New Relic into Symfony2 with ignore transactions update
License MIT
Homepage https://github.com/temando/EkinoNewRelicBundle
Informations about the package newrelic-bundle
Ekino NewRelic Bundle
This bundle integrates the NewRelic PHP API into Symfony2. For more information about NewRelic, please visit http://newrelic.com.
The bundle can use either the route name or the controller name as the transaction name. For CLI commands the transaction name is the command name.
Result
Installation
Step 0 : Install NewRelic
review http://newrelic.com ...
Step 1: Using Composer (recommended)
Use composer.phar
:
You just have to specify the version you want : master-dev
.
It will add the package in your composer.json
file and install it.
Or you can do it by yourself, first, add the following to your composer.json
file:
Then, you can install the new dependencies by running Composer's update
command from the directory where your composer.json
file is located:
Step 1 (alternative) : Using deps
file (Symfony 2.0.x)
First, checkout a copy of the code. Just add the following to the deps
file of your Symfony Standard Distribution:
Then, run
Make sure that you also register the namespace with the autoloader:
Step 2 : Register the bundle
Then register the bundle with your kernel:
Step 3 : Configure the bundle
Enhanced RUM instrumentation
The bundle comes with an option for enhanced real user monitoring. Ordinarily the New Relic extension (unless disabled by configuration) automatically adds a tracking code for RUM instrumentation to all HTML responses. Using enhanced RUM instrumentation, the bundle allows you to selectively disable instrumentation on certain requests.
This can be useful if, e.g. you're returning HTML verbatim for an HTML editor.
If enhanced RUM instrumentation is enabled, you can disable instrumentation for a given request by passing along a request parameter, and setting it to . This can be done e.g. through the routing configuration.
Transaction naming strategies
The bundle comes with two built-in transaction naming strategies. and , naming the New Relic transaction after the route or controller respectively. However, the bundle supports custom transaction naming strategies through the configuration option. If you have selected the configuration option, you must pass the name of your own transaction naming service as the configuration option.
The transaction naming service class must implement the interface. For more information on creating your own services, see the Symfony documentation on Creating/Configuring Services in the Container.
Symfony HTTP Cache
When you are using Symfony's HTTP cache your app/AppCache.php
will build up a response with your Edge Side Includes (ESI). This will look like one transaction in New Relic. When you set using_symfony_cache: true
will these ESI request be separate transaction which improves the statistics. If you are using some other reverse proxy cache or no cache at all, leave this to false.
If true is required to set the application_name
.
Deployment notification
You can use the newrelic:notify-deployment
command to send deployment notifications to New Relic. This requires the api_key
configuration to be set.
The command has a bunch of options, as displayed in the help data.
The bundle provide a Capifony recipe to automate the deployment notifications (see Resources/recipes/newrelic.rb
).
Integration with SonataBlockBundle
Step 0: Install SonataBlockBundle
Review SonataBlockBundle
Step 1: Enable your block:
Integration with SonataAdminBundle
Step 0: Install SonataBlockBundle
Review preview section
Step 1: Install SonataAdminBundle
Review SonataAdminBundle installation
Step 1: Enable your block:
More details for configuration SonataAdminBundle
Integration with Twig
More details for Twig extension