Skip to content

Commit cf89324

Browse files
committed
Do not encode cached value to determine size (#2143)
1 parent 6542912 commit cf89324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/django/caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _instrument_call(cache, method_name, original_method, args, kwargs):
5151
if value:
5252
span.set_data(SPANDATA.CACHE_HIT, True)
5353

54-
size = len(text_type(value).encode("utf-8"))
54+
size = len(text_type(value))
5555
span.set_data(SPANDATA.CACHE_ITEM_SIZE, size)
5656

5757
else:

0 commit comments

Comments
 (0)