From 91a960682c0d856a522e62253bf5417e9c3fe892 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 29 Jul 2025 12:25:43 +0200 Subject: [PATCH 1/2] fix(celery): Latency should be in milliseconds, not seconds --- sentry_sdk/integrations/celery/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sentry_sdk/integrations/celery/__init__.py b/sentry_sdk/integrations/celery/__init__.py index d8d89217ca..1c66ab3bae 100644 --- a/sentry_sdk/integrations/celery/__init__.py +++ b/sentry_sdk/integrations/celery/__init__.py @@ -391,6 +391,7 @@ def _inner(*args, **kwargs): ) if latency is not None: + latency *= 1000 span.set_data(SPANDATA.MESSAGING_MESSAGE_RECEIVE_LATENCY, latency) with capture_internal_exceptions(): From eb19c7d885d740e56ca8fa00d439f79ec5cafefc Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 29 Jul 2025 12:27:33 +0200 Subject: [PATCH 2/2] comment --- sentry_sdk/integrations/celery/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/integrations/celery/__init__.py b/sentry_sdk/integrations/celery/__init__.py index 1c66ab3bae..b5601fc0f9 100644 --- a/sentry_sdk/integrations/celery/__init__.py +++ b/sentry_sdk/integrations/celery/__init__.py @@ -391,7 +391,7 @@ def _inner(*args, **kwargs): ) if latency is not None: - latency *= 1000 + latency *= 1000 # milliseconds span.set_data(SPANDATA.MESSAGING_MESSAGE_RECEIVE_LATENCY, latency) with capture_internal_exceptions():