Skip to content

Conversation

@kcons
Copy link
Member

@kcons kcons commented Sep 19, 2025

The redis client code we use internally reports exceptions that occur during resharding that are handled, and that's noisy.
We can contextually set these to be 'info' and avoid the false impression that something is going wrong.

@kcons kcons requested a review from saponifi3d September 19, 2025 19:38
@kcons kcons requested a review from a team as a code owner September 19, 2025 19:38
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 19, 2025
Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, would be awesome to have a few unit tests as another form of documentation.

yield


@contextmanager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 - think it would be helpful for one of us to give a brown bag on this? (contextmanager)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it's an important tool in the toolbox. If it's not known, sharing that it exists (and maybe ContextVars?) would be helpful.



@contextmanager
def set_sentry_exception_levels(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind adding a quick test file for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had one, and I deleted it because it was a lot of mocks talking to mocks. The Sentry SDK doesn't offer much for validating internal behavior, so I pivoted to just reproducing the reporting situation with a global 'before_send' hook that logs to prove to myself it would do as expected.
I'll add in a basic test though.

@kcons kcons merged commit eabf160 into master Sep 20, 2025
63 checks passed
@kcons kcons deleted the kcons/whew branch September 20, 2025 00:02
@sentry
Copy link

sentry bot commented Sep 21, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants