diff --git a/sentry_sdk/integrations/redis/__init__.py b/sentry_sdk/integrations/redis/__init__.py index f6c4f186ff..07e08ccd7a 100644 --- a/sentry_sdk/integrations/redis/__init__.py +++ b/sentry_sdk/integrations/redis/__init__.py @@ -189,7 +189,11 @@ def sentry_patched_execute_command(self, name, *args, **kwargs): description = description[: integration.max_data_size - len("...")] + "..." with hub.start_span(op=OP.DB_REDIS, description=description) as span: - _set_db_data(span, self.connection_pool.connection_kwargs) + try: + _set_db_data(span, self.connection_pool.connection_kwargs) + except AttributeError: + pass # connections_kwargs may be missing in some cases + _set_client_data(span, is_cluster, name, *args) return old_execute_command(self, name, *args, **kwargs)