Skip to content

Commit

Permalink
fix: Fix context types (getsentry#2627)
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker authored Nov 2, 2020
1 parent 96fd30f commit 1e655e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platforms/common/enriching-events/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ notSupported:
description: "Custom contexts allow you to attach arbitrary data (strings, lists, dictionaries) to an event."
---

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 allow you to attach arbitrary data 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](additional_data.png)

Expand All @@ -23,6 +23,8 @@ To configure additional context:

<PlatformContent includePath="set-context" />

Note that the context's outer value has to be a dictionary/map/object, while the inner values can be arbitrary.

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.
Expand Down

0 comments on commit 1e655e8

Please sign in to comment.