From 7fad40efe61b396988b204fea5600ff832bb60ec Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 5 May 2023 15:50:08 +0200 Subject: [PATCH] Fix: Handle a list of keys (not just a single key) in Django cache spans (#2082) * Just adding the first argument (the key/keys) makes live much easier. --- sentry_sdk/integrations/django/caching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/integrations/django/caching.py b/sentry_sdk/integrations/django/caching.py index cfa952eda3..691a261b3d 100644 --- a/sentry_sdk/integrations/django/caching.py +++ b/sentry_sdk/integrations/django/caching.py @@ -31,7 +31,7 @@ def _instrument_call(cache, method_name, original_method, args, kwargs): if integration is None or not integration.cache_spans: return original_method(*args, **kwargs) - description = "{} {}".format(method_name, " ".join(args)) + description = "{} {}".format(method_name, args[0]) with hub.start_span(op=OP.CACHE, description=description) as span: value = original_method(*args, **kwargs)