storage: don't log DSN#128
Conversation
WalkthroughA log statement that previously printed the Postgres database connection string (DSN) during backend initialization has been removed. All other logic, including error handling and migration, remains unchanged. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR removes the logging of the full DSN in NewPostgresBackend to prevent sensitive credentials from being sent to Graylog.
- Removed Info-level log that printed the entire DSN with password and host details.
Comments suppressed due to low confidence (1)
storage/postgres/db.go:24
- [nitpick] Consider adding a generic connection log at Debug level (e.g.,
logrus.Debug("Connecting to database")) or sanitize the DSN to redact sensitive parts before logging.
func NewPostgresBackend(dsn string, opts *MigrationOptions) (*PostgresBackend, error) {
Since we stream logs to graylog now, we shouldn't log the DSN including the password and host details
Summary by CodeRabbit