Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing attributes in RedisCluster spans #2626

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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):
a-cid marked this conversation as resolved.
Show resolved Hide resolved
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