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
Copy file name to clipboardExpand all lines: README.md
+24
Original file line number
Diff line number
Diff line change
@@ -199,6 +199,30 @@ class SentryContext
199
199
}
200
200
```
201
201
202
+
## Displaying the error ID
203
+
204
+
When something goes wrong and you get a customer email in your inbox it would be nice if they could give you some kind of identitifier for the error they are seeing.
205
+
206
+
Luckily Sentry provides you with just that by adding one of the following options to your error view.
207
+
208
+
```php
209
+
// Using the Sentry facade
210
+
$errorID = Sentry::getLastEventID();
211
+
212
+
// Or without the Sentry facade (Lumen)
213
+
$errorID = app('sentry')->getLastEventID();
214
+
```
215
+
216
+
This could look something like this in for example your `resources/views/error/500.blade.php`:
217
+
218
+
```blade
219
+
@if(!empty(Sentry::getLastEventID()))
220
+
<p>Please send this ID with your support request: {{ Sentry::getLastEventID() }}.</p>
221
+
@endif
222
+
```
223
+
224
+
This ID can be searched for in the Sentry interface allowing you to find the error quickly.
0 commit comments