Skip to content

Latest commit

History

History
91 lines (73 loc) 路 1.81 KB

README.md

File metadata and controls

91 lines (73 loc) 路 1.81 KB

NewRelic PHP agent integration for Nette Framework

Installation

composer require vrtak-cz/newrelic-nette

edit app/bootstrap.php

// add this line after `$configurator = new Nette\Config\Configurator;`
\VrtakCZ\NewRelic\Extension::register($configurator);

Config

newrelic:
	enabled: Yes #default
	ratio: 1
	appName: YourApplicationName #optional
	license: yourLicenseCode #optional
	actionKey: action # default - optional - action parameter name
	logLevel: #defaults
		- critical
		- error

	# optional options with default values
	rum:
		enabled: auto # other options are Yes/No
		ratio: 1
	transactionTracer:
		enabled: Yes
		detail: 1
		recordSql: obfuscated
		slowSql: Yes
		threshold: apdex_f
		stackTraceThreshold: 500
		explainThreshold: 500
	errorCollector:
		enabled: Yes
		recordDatabaseErrors: Yes
	parameters:
		capture: No
		ignored: []
	customParameters:
		paramName: paramValue

Realtime User Monitoring

add this component factory to your base presenter

protected function createComponentNewRelicHeader()
{
	$control = $this->context->newrelic->rum->headerControl;
	$control->disableScriptTag(); // optionall
	return $control;
}

protected function createComponentNewRelicFooter()
{
	$control = $this->context->newrelic->rum->footerControl;
	$control->disableScriptTag(); // optionall
	return $control;
}

and add this to your @layout header (before </head>)

{control newRelicHeader}

and add this to your @layout footer (before </body>)

{control newRelicFooter}

License

NewRelic Nette is licensed under the MIT License - see the LICENSE file for details