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

Replace deprecated sentry_sdk call #10381

Open
jimchamp opened this issue Jan 22, 2025 · 2 comments · May be fixed by #10416
Open

Replace deprecated sentry_sdk call #10381

jimchamp opened this issue Jan 22, 2025 · 2 comments · May be fixed by #10416
Assignees
Labels
1-off tasks Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 2 Important, as time permits. [managed]

Comments

@jimchamp
Copy link
Collaborator

jimchamp commented Jan 22, 2025

Background

The sentry_sdk.push_scope function has been deprecated and is slated for removal in the next major version. It's unclear when version 3.0 of the SDK will be released, but it is being worked on now.

Sentry documentation offers guidance for replacing push_scope calls, here.

Open Library calls sentry_sdk.push_scope here:

def capture_exception_webpy(self):
with sentry_sdk.push_scope() as scope:
scope.add_event_processor(add_web_ctx_to_event)
sentry_sdk.capture_exception()
def capture_exception(self, ex):
with sentry_sdk.push_scope() as scope:
scope.add_event_processor(add_web_ctx_to_event)
sentry_sdk.capture_exception(ex)

@jimchamp jimchamp added 1-off tasks Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] labels Jan 22, 2025
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jan 27, 2025
@jimchamp jimchamp removed the State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] label Jan 30, 2025
@R0gue-one
Copy link

R0gue-one commented Feb 2, 2025

Hey from what I understand we should replace the sentry_sdk.push_scope with sentry_sdk.new_scope as they are running in this small parts of the code only. Should I go ahead and raise a PR ? @mekarpeles

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Feb 3, 2025
@mekarpeles mekarpeles added Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] and removed Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] labels Feb 3, 2025
@mekarpeles
Copy link
Member

I think that makes sense!

@mekarpeles mekarpeles removed the Needs: Response Issues which require feedback from lead label Feb 3, 2025
@R0gue-one R0gue-one linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-off tasks Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants