You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the [Raygun](https://raygun.com/) handler for [SlashTrace](https://github.com/slashtrace/slashtrace).
4
+
Use it to send your errors and exceptions to your Raygun account.
5
+
6
+
## Usage
7
+
8
+
1. Install using Composer:
9
+
10
+
```
11
+
composer require slashtrace/slashtrace-raygun
12
+
```
13
+
14
+
2. Hook it into SlashTrace:
15
+
16
+
```PHP
17
+
use SlashTrace\SlashTrace;
18
+
use SlashTrace\Raygun\RaygunHandler;
19
+
20
+
$handler = new RaygunHandler("Your Raygun API key");
21
+
22
+
$slashtrace = new SlashTrace();
23
+
$slashtrace->addHandler($handler);
24
+
```
25
+
26
+
Alternatively, you can pass in a pre-configured Raygun client when you instantiate the handler:
27
+
28
+
```
29
+
$raygun = new Raygun4php\RaygunClient("Your Raygun API key");
30
+
$handler = new RaygunHandler($raygun);
31
+
32
+
$slashtrace->addHandler($handler);
33
+
```
34
+
35
+
Read the [SlashTrace](https://github.com/slashtrace/slashtrace) docs to see how to capture errors and exceptions, and how to attach additional data to your events.
0 commit comments