diff --git a/README.md b/README.md index 7a4dcd1..1d6dcb0 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ [![Build Status](https://img.shields.io/travis/Vrtak-CZ/NewRelic-Nette.svg?style=flat-square)](https://travis-ci.org/Vrtak-CZ/NewRelic-Nette) [![Latest Stable Version](https://img.shields.io/packagist/v/vrtak-cz/newrelic-nette.svg?style=flat-square)](https://packagist.org/packages/vrtak-cz/newrelic-nette) [![Composer Downloads](https://img.shields.io/packagist/dt/vrtak-cz/newrelic-nette.svg?style=flat-square)](https://packagist.org/packages/vrtak-cz/newrelic-nette) -[![Dependency Status](https://img.shields.io/versioneye/d/user/projects/534bc43bfe0d0784f300004a.svg?style=flat-square)](https://www.versioneye.com/user/projects/534bc43bfe0d0784f300004a) -## Requirements -- Nette >=2.3.0 (2.3.x support will be removed on 31 Jan 2017) -- PHP >=5.5.0 (5.5.x support will be removed on 10 Jul 2016) +## Versions +| State | Version | Branch | Nette | PHP | +|--------|--------:|--------|-------:|--------:| +| stable | `^8.0` | master | `^3.0` | `>=7.1` | +| stable | `^7.0` | master | `^2.4` | `>=5.6` | Installation ------------ @@ -29,34 +30,34 @@ Config ```yaml newrelic: - enabled: Yes #default - appName: YourApplicationName #optional - license: yourLicenseCode #optional - actionKey: action # default - optional - action parameter name - logLevel: #defaults - - critical - - exception - - error - - # optional options with default values - rum: - enabled: auto # other options are Yes/No - 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 + enabled: Yes #default + appName: YourApplicationName #optional + license: yourLicenseCode #optional + actionKey: action # default - optional - action parameter name + logLevel: #defaults + - critical + - exception + - error + + # optional options with default values + rum: + enabled: auto # other options are Yes/No + 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 @@ -65,18 +66,28 @@ Realtime User Monitoring add this component factory to your base presenter ```php +/** + * @var \VrtakCZ\NewRelic\Nette\RUM\HeaderControl + * @inject + */ +protected $headerControl; + +/** + * @var \VrtakCZ\NewRelic\Nette\RUM\FooterControl + * @inject + */ +protected $footerControl; + protected function createComponentNewRelicHeader() { - $control = $this->context->getService('newrelic.rum')->headerControl; - $control->disableScriptTag(); // optionall - return $control; + $this->headerControl->disableScriptTag(); // optional + return $this->headerControl; } protected function createComponentNewRelicFooter() { - $control = $this->context->getService('newrelic.rum')->footerControl; - $control->disableScriptTag(); // optionall - return $control; + $this->footerControl->disableScriptTag(); // optional + return $this->footerControl; } ```