From 93e9762112b262c5351dce5c875d767b883d7df0 Mon Sep 17 00:00:00 2001 From: Tomas Jacik Date: Mon, 8 Mar 2021 04:17:44 +0100 Subject: [PATCH] Updated DOCS --- .docs/README.md | 157 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 104 insertions(+), 53 deletions(-) diff --git a/.docs/README.md b/.docs/README.md index 1cf36bd..4e4f496 100644 --- a/.docs/README.md +++ b/.docs/README.md @@ -3,40 +3,50 @@ ## Content - [Setup](#setup) -- [Usage](#usage) +- [Configuration](#configuration) - [Realtime User Monitoring](#realtime-user-monitoring) -- [Tracy](#tracy) +- [Console](#console) +- [Agent](#agent) ## Setup -**Install package with composer:** +Install package -``` +```bash composer require contributte/newrelic ``` -**Register as nette extension:** +Register extension ```yaml extensions: newrelic: Contributte\NewRelic\DI\NewRelicExtension ``` -## Usage +## Configuration + +Basic configuration ```yaml newrelic: - enabled: true #default - appName: YourApplicationName #optional - license: yourLicenseCode #optional - logLevel: #defaults + enabled: true # true is default + # use false on dev when newrelic extension is not present + appName: YourApplicationName # optional, defaults to "PHP Application" +``` + +Full configuration with default values + +```yaml +newrelic: + enabled: true + appName: PHP Application + license: '' + logLevel: - critical - exception - error - - # optional options with default values rum: - enabled: auto # other options are true/false + enabled: auto transactionTracer: enabled: true detail: 1 @@ -47,82 +57,123 @@ newrelic: explainThreshold: 500 errorCollector: enabled: true - recordDatabaseErrors: Yes + recordDatabaseErrors: true parameters: capture: false ignored: [] custom: - parameters: - paramName: paramValue - tracers: + parameters: [] + tracers: [] ``` ## Realtime User Monitoring -Add this component factory to your base presenter: +If config option `rum/enabled` is set to `auto` (default), NewRelic extension is handling adding +of monitoring JS on its own. You can disable that behavior setting this option to `true` or `false`. +In both cases, auto instrumentation is set off. If set to `false`, `Agent` class is returning empty +string when calling `getBrowserTimingHeader()` and `getBrowserTimingFooter()` functions. + +To specify where these JS should be added, you can either add `RUMControlTrait` to your +`BasePresenter` or create components your own way if you want to avoid adding `