Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(integrations): add support for cluster clients from redis sdk #2394
feat(integrations): add support for cluster clients from redis sdk #2394
Changes from 8 commits
ae5bca6
8734b01
1f125c1
06ab2c2
cd2441a
5c99ddd
3e6e9b6
c868892
78c8795
d5c5a99
3360168
7a77138
eeb534a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 16 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L16
Check warning on line 19 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L18-L19
Check warning on line 148 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L147-L148
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we could try to avoid using
_client
here, and instead access what we need through a public API? I would strongly prefer to avoid using an external library's private API, since the private API could change at any time and cause problems in the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't believe there is a way we can avoid using
_client
. We can use a try/except here to be safe and log when it is unavailable. Is there a standard way to raise sentry internal warnings?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, in that case, we can use
capture_internal_exceptions
here. I also checked that one of your unit tests is verifying this function, so we will get a test failure if_client
ever gets removedCheck warning on line 248 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L248
Check warning on line 321 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L321
Check warning on line 324 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L324
Check warning on line 327 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L327
Check warning on line 339 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L339
Check warning on line 351 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L351
Check warning on line 359 in sentry_sdk/integrations/redis/__init__.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/__init__.py#L359
Check warning on line 19 in sentry_sdk/integrations/redis/asyncio.py
Codecov / codecov/patch
sentry_sdk/integrations/redis/asyncio.py#L16-L19