diff --git a/sentry_sdk/integrations/django/caching.py b/sentry_sdk/integrations/django/caching.py index affbae3226..921f8e485d 100644 --- a/sentry_sdk/integrations/django/caching.py +++ b/sentry_sdk/integrations/django/caching.py @@ -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: