Customizing Error Reports
Honeybadger has several ways to customize the data reported with each error to add custom metadata and request information.
Honeybadger can display additional custom key/value metadata — or "context" — with each error report. Context data can be anything, but a few keys have a special meaning in Honeybadger.
$honeybadger->context(); to add global context to error
$honeybadger->context('user_id', 123); // Add multiple context items: $honeybadger->context([ 'user_id' => 123, 'user_email' => 'email@example.com', ]);
While you can add any key/value data to context, a few keys have special meaning in Honeybadger:
Honeybadger automatically includes request information for error reports in Laravel/Lumen. In other frameworks which rely on Symphony's HttpFoundation component, you can include request information when reporting exceptions: