Skip to content

Commit

Permalink
Handle missing connection_kwargs in patch_redis_client (#2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex committed Nov 2, 2023
1 parent 47aec4d commit bffaeda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sentry_sdk/integrations/redis/__init__.py
Expand Up @@ -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)
Expand Down

0 comments on commit bffaeda

Please sign in to comment.