Skip to content

Commit 36d6279

Browse files
authored
Merge pull request #21 from homiedopie/feature/LNX-332-rum-v2
LNX-332 - Initial commit for RUMv2 support
2 parents 26b4f08 + b3dd5ba commit 36d6279

9 files changed

Lines changed: 1518 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.

composer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,14 @@
1717
"psr-4": {
1818
"Stackify\\": "src/Stackify"
1919
}
20+
},
21+
"autoload-dev": {
22+
"psr-4": {
23+
"Stackify\\Tests\\": "tests/"
24+
}
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^5",
28+
"phpunit/php-timer": "^1.0.6"
2029
}
2130
}

phpunit.xml.dist

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
beStrictAboutTestsThatDoNotTestAnything="false"
5+
bootstrap="tests/bootstrap.php"
6+
colors="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnError="false"
12+
stopOnFailure="false"
13+
verbose="true"
14+
>
15+
<testsuites>
16+
<testsuite name="Stackify PHP Logger Test Suite">
17+
<directory suffix="Test.php">./tests</directory>
18+
</testsuite>
19+
</testsuites>
20+
<php>
21+
<ini name="memory_limit" value="2048M" />
22+
<ini name="stackify.auto_prepend_library" value="0" />
23+
</php>
24+
</phpunit>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
namespace Stackify\Exceptions;
4+
5+
class RumValidationException extends StackifyException {}

0 commit comments

Comments
 (0)