Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
| # Log only essential connection details (host, port, db), exclude sensitive info | ||
| conn_kwargs = _connection._client.connection_kwargs | ||
| minimal_details = { | ||
| "host": conn_kwargs.get("host"), | ||
| "port": conn_kwargs.get("port"), | ||
| "db": conn_kwargs.get("db"), | ||
| "read_from_replicas": conn_kwargs.get("read_from_replicas"), | ||
| "username": conn_kwargs.get("username"), | ||
| "ssl": conn_kwargs.get("ssl"), | ||
| } | ||
| logger.debug("Redis connection details: {}", minimal_details) |
There was a problem hiding this comment.
thought i'd throw this in since we're struggling to understand the current problem, but this may be too noisy and is also generally a bit 'fragile' if new connection args come in.
i don't want to blindly log connection_kwargs because of the password and ssl certs, etc.
There was a problem hiding this comment.
yeah -- maybe we can add it as a temporary log so we can diagnose nightly , and then remove it ?
Greptile SummaryThis PR adds improved error logging when Redis cache connection fails. The changes capture and log the exception along with minimal connection details (host, port, db, username, ssl settings) at debug level to help diagnose connection issues.
The implementation is straightforward but has minor inconsistencies with the read-only cache error handling. Confidence Score: 4/5
Important Files Changed
Last reviewed commit: eb08b4e |
| "port": conn_kwargs.get("port"), | ||
| "db": conn_kwargs.get("db"), | ||
| "read_from_replicas": conn_kwargs.get("read_from_replicas"), | ||
| "username": conn_kwargs.get("username"), |
There was a problem hiding this comment.
logging username might be considered sensitive info despite the comment saying "exclude sensitive info"
Additional Comments (1)
|
Co-authored-by: Adrian Galvan <adrian@ethyca.com>
Ticket []
Description Of Changes
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works