damejidlo/newrelic

This package is abandoned and no longer maintained. No replacement package was suggested.

Newrelic integration into Nette Framework

Installs: 96 925

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 10

Forks: 1

3.0.1 2019-09-09 16:28 UTC

This package is auto-updated.

Last update: 2020-01-16 15:01:21 UTC


README

Downloads this Month Latest Stable Version

Install

composer require damejidlo/newrelic

Configure

Register NewRelicExtension in your config:

extensions:
    newrelic: Damejidlo\NewRelic\DI\NewRelicExtension(%consoleMode%)

newrelic:
	applicationName: fooBar
	applicationModules:
		web:
			'/api/': Api
			'/admin/': Admin
			'': Front
		console:
			'bin/foo.php ': Foo
			'': Console
	autorum: FALSE
	customTracers:
		- 'Doctrine\ORM\EntityManager::flush'

Put $_ENV settings (something like this) into index.php:

<?php

$_ENV['REQUEST_TIME_FLOAT'] = microtime(TRUE);

$container = require __DIR__ . '/../app/bootstrap.php';

$_ENV['COMPILATION_TIME_FLOAT'] = microtime(TRUE);

$container->getByType(\Nette\Application\Application::class)->run();