Skip to content

Commit b52f66e

Browse files
committed
clean up func
1 parent c368f5c commit b52f66e

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

sentry_sdk/integrations/redis/utils.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ def _set_pipeline_data(
112112
is_transaction: bool,
113113
commands_seq: "Sequence[Any]",
114114
) -> None:
115-
if isinstance(span, Span):
116-
span.set_tag("redis.is_cluster", is_cluster)
117-
span.set_tag("redis.transaction", is_transaction)
115+
# TODO: Remove when removing transaction based tracing
116+
if isinstance(span, StreamedSpan):
117+
return
118+
119+
span.set_tag("redis.is_cluster", is_cluster)
120+
span.set_tag("redis.transaction", is_transaction)
118121

119122
commands = []
120123
for i, arg in enumerate(commands_seq):
@@ -124,14 +127,13 @@ def _set_pipeline_data(
124127
command = get_command_args_fn(arg)
125128
commands.append(_get_safe_command(command[0], command[1:]))
126129

127-
if not isinstance(span, StreamedSpan):
128-
span.set_data(
129-
"redis.commands",
130-
{
131-
"count": len(commands_seq),
132-
"first_ten": commands,
133-
},
134-
)
130+
span.set_data(
131+
"redis.commands",
132+
{
133+
"count": len(commands_seq),
134+
"first_ten": commands,
135+
},
136+
)
135137

136138

137139
def _set_client_data(

0 commit comments

Comments
 (0)