Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions sentry_sdk/integrations/redis/_async_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,17 @@ async def _sentry_execute_command(
set_db_data_fn(db_span, self)
_set_client_data(db_span, is_cluster, name, *args)

value = await old_execute_command(self, name, *args, **kwargs)
try:
value = await old_execute_command(self, name, *args, **kwargs)

db_span.end()
if cache_span:
_set_cache_data(cache_span, self, cache_properties, value)

if cache_span:
_set_cache_data(cache_span, self, cache_properties, value)
cache_span.end()
return value
finally:
db_span.end()

return value
if cache_span:
cache_span.end()
Comment thread
sentrivana marked this conversation as resolved.
Resolved

cls.execute_command = _sentry_execute_command # type: ignore
Loading