Skip to content

Commit 233e93a

Browse files
committed
LNX-332 - Add RUMv2 doc
1 parent 58cfa70 commit 233e93a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,38 @@ $config = array(
167167
$logger = new Logger('application_name', 'environment_name', $transport, true, $config);
168168
```
169169

170+
### **Real User Monitoring (RUM)**
171+
172+
Real user monitoring injects a script tag containing the [RUM JS](https://stackify.com/retrace-real-user-monitoring/) that is responsible for capturing information about the http requests on the browser. This approach is manual and needs to be configured.
173+
174+
#### RUM - Setup
175+
176+
```php
177+
/** Requires composer **/
178+
$applicationName = 'Your Application Name';
179+
$environment = 'YourEnvironment';
180+
$rumKey = 'YourRumKey';
181+
182+
\Stackify\Utils\Rum::getInstance()->setupConfiguration(
183+
$applicationName,
184+
$environment,
185+
$rumKey
186+
);
187+
```
188+
189+
#### RUM - Application
190+
```php
191+
<!DOCTYPE html>
192+
<html>
193+
<head>
194+
<meta charset="utf-8" />
195+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
196+
<?php echo \Stackify\Utils\Rum::getInstance()->insertRumScript(); ?>
197+
<title>Title</title>
198+
</head>
199+
...
200+
```
201+
170202
## License
171203

172204
Copyright 2019 Stackify, LLC.

0 commit comments

Comments
 (0)