-
Notifications
You must be signed in to change notification settings - Fork 515
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
ref(beam): Use new scopes API #2879
Conversation
sentry_sdk/integrations/beam.py
Outdated
client = hub.client | ||
if client is None: | ||
integration = client.get_integration(BeamIntegration) | ||
if integration is None: |
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.
It would be nice if we could use ensure_integration_enabled
here, but I don't think it is possible with the current implementation, since there is no original function here. I think I could tweak the decorator a bit to make this use case possible though
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.
Yes, this is something that would be useful in many other integrations as well. I think we could just make the function in the decorator optional.
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.
It is a bit more complex than that if we want type hinting to work properly. I am almost ready with a PR
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.
Here is the PR: #2893
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.
I just merged #2893. If you could update this branch and use the updated decorator here, that would be great!
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.
Added a comment. Would be nice if you can include it in this PR, but would also be ok to make the change in a separate PR.
Edit: Never mind the above, just saw your comment here. Making the changes in a separate PR makes sense.
sentry_sdk/integrations/beam.py
Outdated
client = hub.client | ||
if client is None: | ||
integration = client.get_integration(BeamIntegration) | ||
if integration is None: |
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.
I just merged #2893. If you could update this branch and use the updated decorator here, that would be great!
Updated to use the new decorator anyways 🚀 (Just didn't want to be blocked on these PRs, but now that you've merged the decorator changes, happy to use it. The rest of the integrations we should do in a separate PR though.) |
General Notes
Thank you for contributing to
sentry-python
!Please add tests to validate your changes, and lint your code using
tox -e linters
.Running the test suite on your PR might require maintainer approval. Some tests (AWS Lambda) additionally require a maintainer to add a special label to run and will fail if the label is not present.
For maintainers
Sensitive test suites require maintainer review to ensure that tests do not compromise our secrets. This review must be repeated after any code revisions.
Before running sensitive test suites, please carefully check the PR. Then, apply the
Trigger: tests using secrets
label. The label will be removed after any code changes to enforce our policy requiring maintainers to review all code revisions before running sensitive tests.