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

🔒️ Remove sensitive data from logs #6905

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/service-library/src/servicelib/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from redis.backoff import ExponentialBackoff
from settings_library.redis import RedisDatabase, RedisSettings
from tenacity import retry
from yarl import URL

from .background_task import periodic_task
from .logging_utils import log_catch, log_context
Expand Down Expand Up @@ -94,7 +95,8 @@ def __post_init__(self):
async def setup(self) -> None:
if not await self.ping():
await self.shutdown()
raise CouldNotConnectToRedisError(dsn=self.redis_dsn)
url_safe: URL = URL(self.redis_dsn).with_password("???")
raise CouldNotConnectToRedisError(dsn=f"{url_safe}")

self._health_check_task = asyncio.create_task(
self._check_health(),
Expand Down
Loading