Skip to content

Commit 472c6c8

Browse files
committed
Trim http data and bump limit to 512
1 parent 5497df7 commit 472c6c8

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/developer/client/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ Most arbitrary values in Sentry have their size restricted. This means any
556556
values that are sent as metadata (such as variables in a stacktrace) as well
557557
as things like extra data, or tags.
558558

559-
- Unstructured data is limited to 256 characters.
559+
- Unstructured data is limited to 512 characters.
560560
- Event IDs are limited to 32 characters.
561561
- Tag keys are limited to 32 characters.
562562
- Tag values are limited to 200 characters.

src/sentry/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@
156156

157157
# Prevent variables (e.g. context locals, extra data) from exceeding this size
158158
# in bytesish
159-
MAX_VARIABLE_SIZE = 256
159+
MAX_VARIABLE_SIZE = 512

src/sentry/manager.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ def save_data(self, project, data):
480480
if value:
481481
exc_data[key] = trim(value)
482482

483+
if 'sentry.interfaces.Http' in data:
484+
http_data = data['sentry.interfaces.Http']
485+
for key in ('data', 'cookies', 'querystring', 'headers', 'env'):
486+
value = http_data.get(key)
487+
if value:
488+
http_data[key] = trim(value)
489+
483490
kwargs = {
484491
'level': level,
485492
'message': message,

0 commit comments

Comments
 (0)