Add Context

Custom contexts allow you to attach arbitrary data (strings, lists, dictionaries) to an event. You cannot search these, but they are viewable on the issue page:

Custom contexts as viewed on the Additional Data section of an event

To configure additional context:

The platform or SDK you've selected either does not support this functionality, or it is missing from documentation.

If you think this is an error, feel free to let us know on GitHub.

When sending context, be aware of maximum payload size, especially if you want to send the whole application state as extra data. Sentry does not recommend this approach since application state can be very large and easily exceed the 200kB maximum that Sentry has on individual event payloads. When this happens, you’ll receive an HTTP Error 413 Payload Too Large message as the server response or (when you set keepalive: true as a fetch parameter), the request will stay pending forever (for example, in Google Chrome).

Sentry will try its best to accommodate the data you send, but Sentry will trim large context payloads or truncate the payloads entirely.

For more details, see the developer documentation on SDK data handling.

Extra Data, Additional Data

If you come across any usages of "extra" (setExtra in code) or "Additional Data" (in the UI), just mentally substitute it for context. Extra is deprecated in favor of context within most SDKs.

You can edit this page on GitHub.