diff --git a/sentry_sdk/integrations/arq.py b/sentry_sdk/integrations/arq.py index d568714fe2..d61499139b 100644 --- a/sentry_sdk/integrations/arq.py +++ b/sentry_sdk/integrations/arq.py @@ -71,6 +71,7 @@ def setup_once(): def patch_enqueue_job(): # type: () -> None old_enqueue_job = ArqRedis.enqueue_job + original_kwdefaults = old_enqueue_job.__kwdefaults__ async def _sentry_enqueue_job(self, function, *args, **kwargs): # type: (ArqRedis, str, *Any, **Any) -> Optional[Job] @@ -83,6 +84,7 @@ async def _sentry_enqueue_job(self, function, *args, **kwargs): ): return await old_enqueue_job(self, function, *args, **kwargs) + _sentry_enqueue_job.__kwdefaults__ = original_kwdefaults ArqRedis.enqueue_job = _sentry_enqueue_job