Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fcf7a4b

Browse files
authoredDec 18, 2020
redis: fix default port KeyError, wrong attr name
1 parent 65801c3 commit fcf7a4b

File tree

1 file changed

+1
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis

1 file changed

+1
-1
lines changed
 

Diff for: ‎instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _extract_conn_attributes(conn_kwargs):
2727
attributes["db.redis.database_index"] = db
2828
try:
2929
attributes["net.peer.name"] = conn_kwargs["host"]
30-
attributes["net.peer.ip"] = conn_kwargs["port"]
30+
attributes["net.peer.port"] = conn_kwargs.get("port", 6379)
3131
attributes["net.transport"] = "IP.TCP"
3232
except KeyError:
3333
attributes["net.peer.name"] = conn_kwargs["path"]

0 commit comments

Comments
 (0)
Please sign in to comment.