Skip to content

Remove unnecessary wrappers from _sentry_monitoring - #76

Merged
sethmlarson merged 4 commits into
python:mainfrom
brettcs:remove-sentry-wrapper
Nov 16, 2026
Merged

sethmlarson merged 4 commits into
python:mainfrom
brettcs:remove-sentry-wrapper

Conversation

@brettcs

@brettcs brettcs commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Since the Sentry SDK already noops itself when you initialize it without a DSN, rely on that and remove our own wrappers that do so.

The commits might be easier to review individually.

Closes #76.

If you initialize the SDK with no DSN, the entire module acts as a noop. We
don't need our own module to implement the same logic, so remove that.
We no longer need to check for Sentry initialization since we do it
unconditionally. But this does break the existing HTTPError test, so add a more
specialized one.
This keeps all the Sentry reporting code in the dedicated module and lets us
DRY up some of the logic.
Comment thread tests/test_sentry_monitoring.py Resolved

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One question, otherwise LGTM.

@sethmlarson

Copy link
Copy Markdown
Collaborator

@brettcs Also, you can add "Closes #76" to your pull request description and GitHub will auto-close issues once the PR is merged.

Ensure the SDK does not contact a real server if the patch fails.
@sethmlarson
sethmlarson merged commit 7fbe968 into python:main Nov 16, 2026
3 checks passed
@brettcs
brettcs deleted the remove-sentry-wrapper branch November 16, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants