bazilio/yii2-newrelic

Newrelic integration for Yii2

Installs: 347 968

Dependents: 0

Suggesters: 0

Security: 0

Stars: 23

Watchers: 7

Forks: 8

Open Issues: 1

Type:yii2-extension

1.0.1 2020-11-03 18:25 UTC

This package is auto-updated.

Last update: 2024-03-29 03:01:22 UTC


README

This extension describes routes, action params and instruments views with newrelic end user monitoring scripts. Supports console and web applications.

Latest Stable Version Total Downloads Latest Unstable Version License

For license information check the LICENSE-file.

Requirements

Works with newrelic agent with version >=3.0

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bazilio/yii2-newrelic

or add

"bazilio/yii2-newrelic": "^1.0"

to the require section of your composer.json.

Configuration

To use this extension, you have to configure your components & bootstrap section your application configuration:

return [
    'bootstrap' => ['newrelic'],
    'components' => [
        // ...
        'newrelic' => [
            'enableEndUser' => true, // MIND THIS! It is JS instrumentation for end user. Default is true.
            'class' => 'bazilio\yii\newrelic\Newrelic',
            'name' => 'My App Frontend', // optional, uses Yii::$app->name by default
            'handler' => 'class/name', // optional, your custom handler
            'licence' => '...', // optional
            'enabled' => false // optional, default = true
        ]
    ],
];