From 857581ca51fc2e9e497d196fa018312c0e13dcac Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Mon, 16 Nov 2020 20:53:50 +0530 Subject: [PATCH] Remove PIPELINE from span name --- .../src/opentelemetry/instrumentation/redis/__init__.py | 3 +-- .../tests/redis/test_redis_functional.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py index f8ec42c0c..66a3c8468 100644 --- a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py @@ -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 diff --git a/tests/opentelemetry-docker-tests/tests/redis/test_redis_functional.py b/tests/opentelemetry-docker-tests/tests/redis/test_redis_functional.py index 749ee1044..b893a33b6 100644 --- a/tests/opentelemetry-docker-tests/tests/redis/test_redis_functional.py +++ b/tests/opentelemetry-docker-tests/tests/redis/test_redis_functional.py @@ -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",