Skip to content

Commit 65e2c64

Browse files
authored
fix missing attributes in RedisCluster spans
1 parent b94c590 commit 65e2c64

File tree

1 file changed

+2
-0
lines changed
  • instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis

1 file changed

+2
-0
lines changed

instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def response_hook(span, instance, response):
128128

129129

130130
def _set_connection_attributes(span, conn):
131+
if hasattr(conn, "nodes_manager"):
132+
conn = conn.nodes_manager.default_node.redis_connection
131133
if not span.is_recording() or not hasattr(conn, "connection_pool"):
132134
return
133135
for key, value in _extract_conn_attributes(

0 commit comments

Comments
 (0)