Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def response_hook(span, instance, response):


def _set_connection_attributes(span, conn):
if hasattr(conn, "nodes_manager"):
conn = conn.nodes_manager.default_node.redis_connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not access connection_kwargs directly from the NodeManager or is this a different set of kwargs?

Copy link
Author

@a-cid a-cid Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, I've been a bit busy with work.

The call to cleanup_kwargs removes host and port from the kwargs passed to the NodeManager, so we have to get them from the nodes.

if not span.is_recording() or not hasattr(conn, "connection_pool"):
return
for key, value in _extract_conn_attributes(
Expand Down