Skip to content

Commit

Permalink
Do not encode cached value to determine size (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Jun 5, 2023
1 parent 73d608a commit 3e5cf41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/django/caching.py
Expand Up @@ -51,7 +51,7 @@ def _instrument_call(cache, method_name, original_method, args, kwargs):
if value:
span.set_data(SPANDATA.CACHE_HIT, True)

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

else:
Expand Down

0 comments on commit 3e5cf41

Please sign in to comment.