---
title: Customizing error reports
description: Learn how to customize error reports with metadata and request information.
url: https://docs.honeybadger.io/lib/php/errors/customizing-error-reports/
---

Honeybadger has several ways to customize the data reported with each error to add custom metadata and request information.

## Custom metadata (context)

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.

Use `$honeybadger->context();` to add global context to error reports:

```php
$honeybadger->context('user_id', 123);


// Add multiple context items:
$honeybadger->context([
  'user_id' => 123,
  'user_email' => 'homer@simpsons.com',
]);
```

***

While you can add any key/value data to context, a few keys have special meaning in Honeybadger:

| Option       | Description                                                                                           |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| `user_id`    | The `String` user ID used by Honeybadger to aggregate user data across occurrences on the error page. |
| `user_email` | Same as `user_id`, but for email addresses                                                            |

## Sending request information

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:

```php
$honeybadger->notify($error, $request);
```

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
