Skip to content

Move public types to a more public place #4127

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

Closed
sentrivana opened this issue Mar 11, 2025 · 1 comment · Fixed by #4315
Closed

Move public types to a more public place #4127

sentrivana opened this issue Mar 11, 2025 · 1 comment · Fixed by #4315

Comments

@sentrivana
Copy link
Contributor

Problem Statement

See #4122

This is mostly about Event and Hint, but other types could be useful as well.

Currently, they are not easy to find -- IDEs have a hard time too. This makes writing custom callbacks like before_send harder than it should be.

Solution Brainstorm

We should consider moving them to types directly (instead of just re-exporting them there), or possibly even on the top level so that folks can just do from sentry_sdk import init, Event, Hint.

A small improvement for potel-base maybe?

@MarcoGlauser
Copy link

In general, please consider all types that are used for public apis also public.
One such example is MonitorConfig, which is required when manually instrumenting cron job monitoring. I understand you don't want people using internal stuff, but currently it's difficult to tell them apart because even supposedly public types are in the private namespace.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 25, 2025
@antonpirker antonpirker self-assigned this Apr 15, 2025
This was referenced Apr 16, 2025
antonpirker added a commit that referenced this issue Apr 22, 2025
Make types that users can use when configuring the SDK public. 

Accompaniyng docs update:
getsentry/sentry-docs#13437

Fixes #4127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants