From 6d32aedc8feb4a918fe0ec03ec1ee9fb6666ed1f Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 5 May 2023 15:24:20 +0200 Subject: [PATCH 1/2] Make it possible to args being a list of lists --- 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..78340bb9c9 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) with hub.start_span(op=OP.CACHE, description=description) as span: value = original_method(*args, **kwargs) From 1133a7c5158986e921b6a2da4cee5dd357cfbc98 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 5 May 2023 15:39:47 +0200 Subject: [PATCH 2/2] 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 78340bb9c9..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, args) + description = "{} {}".format(method_name, args[0]) with hub.start_span(op=OP.CACHE, description=description) as span: value = original_method(*args, **kwargs)