Remove PIPELINE from span name

This commit is contained in:
Srikanth Chekuri 2020-11-16 20:53:50 +05:30
parent edaf0b1611
commit 857581ca51
2 changed files with 2 additions and 3 deletions

View File

@ -90,8 +90,7 @@ def _traced_execute_pipeline(func, instance, args, kwargs):
cmds = [_format_command_args(c) for c, _ in instance.command_stack]
resource = "\n".join(cmds)
pipeline_cmnds = " ".join([args[0] for args, _ in instance.command_stack])
span_name = "PIPELINE" + " " + pipeline_cmnds
span_name = " ".join([args[0] for args, _ in instance.command_stack])
with tracer.start_as_current_span(
span_name, kind=trace.SpanKind.CLIENT

View File

@ -72,7 +72,7 @@ class TestRedisInstrument(TestBase):
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 1)
span = spans[0]
self._check_span(span, "PIPELINE SET RPUSH HGETALL")
self._check_span(span, "SET RPUSH HGETALL")
self.assertEqual(
span.attributes.get("db.statement"),
"SET blah 32\nRPUSH foo éé\nHGETALL xxx",