Skip to main content

Why am I seeing error "Invalid JSON data: Data too long" in my event breadcrumbs?

Issue

n my event's Breadcrumbs (or another event field), a value is replaced with the error "Invalid JSON data: Data too long" instead of showing the data I expected.

Screenshot 2024-04-25 at 10.22.43 AM.png

[Screenshot: an event's Breadcrumbs showing a field replaced with the "Invalid JSON data: Data too long" error.]

Applies To

  • All SaaS Customers and Self-Hosted Users

  • Error Monitoring

  • Performance Monitoring

  • All SDKs that support breadcrumbs

Symptoms

  • One or more fields in the event payload cannot be viewed; the field is replaced with "Invalid JSON data: Data too long".

Resolution

This happens when an individual field in the event exceeds its allowed size limit. Sentry trims and truncates fields that exceed their per-field limits, and when a value is too large to store, it is replaced with "Invalid JSON data: Data too long". You can review the exact limits in the size limits documentation.

To resolve this, reduce the size of the value before you send it:

  • Trim large strings or payloads in your application before attaching them to breadcrumbs or other fields.

  • If you regularly need to send more data, put it in extra, which allows up to 16kB per item (total extra data is limited to 256kB). For reference, context objects are limited to 8kB.

Did this answer your question?