Skip to content

Cleanup imports to always use the top level api. #93307

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

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Jun 11, 2025

We want every user to always use the top level API provided by the SDK. This does not change any behavior it just makes sure that users do not use classes/APIs that are not strictly public.

Also of note: If you see sentry_sdk.capture_exception() you immediately know that it is from the Sentry SDk. If you see capture_exception() it could come from some other place that does god knows what.

@antonpirker antonpirker requested review from a team as code owners June 11, 2025 07:17
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 11, 2025
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 90.62500% with 6 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/api/endpoints/seer_rpc.py 50.00% 3 Missing ⚠️
src/sentry/api/endpoints/internal/rpc.py 66.66% 2 Missing ⚠️
src/sentry/integrations/base.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #93307      +/-   ##
==========================================
- Coverage   88.00%   88.00%   -0.01%     
==========================================
  Files       10267    10267              
  Lines      592054   592059       +5     
  Branches    22996    22996              
==========================================
+ Hits       521026   521027       +1     
- Misses      70597    70601       +4     
  Partials      431      431              

@antonpirker antonpirker merged commit be79544 into master Jun 11, 2025
60 checks passed
@antonpirker antonpirker deleted the antonpirker/clean-sdk-imports branch June 11, 2025 11:25
Copy link

sentry-io bot commented Jun 11, 2025

Suspect Issues

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

  • ‼️ ReadTimeout: SafeHTTPSConnectionPool(host='api.foam.ai', port=443): Read timed out. (read timeout=2.0) sentry.sentry_apps.tasks.sentry_apps.send_resou... View Issue
  • ‼️ ReadTimeout: SafeHTTPSConnectionPool(host='api.linear.app', port=443): Read timed out. (read timeout=2.0) sentry.sentry_apps.tasks.sentry_apps.send_resou... View Issue
  • ‼️ IdentityNotValid: HTTP 400 (invalid_grant): AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '499b84ac-1321-427f-aa17-267ca6975798'. Trace ID: 7293b1a5-544b-4... sentry.integrations.vsts.tasks.vsts_subscriptio... View Issue
  • ‼️ Group.DoesNotExist: Group matching query does not exist. sentry.tasks.process_suspect_commits View Issue
  • ‼️ RateLimitExceeded: Query on could not be run due to allocation policies, info: {'details': {'ReferrerGuardRailPolicy': {'can_run': False, 'max_threads': 0, 'explanation': {'reason': 'concurrent policy 146 exceeds limit of 100', 'policy': 'referrer_guard_rail_policy', 'ref... reports:sentry.tasks.summaries.weekly_reports.p... View Issue

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

vishnupsatish pushed a commit that referenced this pull request Jun 12, 2025
We want every user to always use the top level API provided by the SDK.
This does not change any behavior it just makes sure that users do not
use classes/APIs that are not strictly public.

Also of note: If you see `sentry_sdk.capture_exception()` you
immediately know that it is from the Sentry SDk. If you see
`capture_exception()` it could come from some other place that does god
knows what.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
We want every user to always use the top level API provided by the SDK.
This does not change any behavior it just makes sure that users do not
use classes/APIs that are not strictly public.

Also of note: If you see `sentry_sdk.capture_exception()` you
immediately know that it is from the Sentry SDk. If you see
`capture_exception()` it could come from some other place that does god
knows what.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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