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

Extend envelope API to allow event-specific attachments #978

Open
hongjiaheng opened this issue Apr 11, 2024 · 3 comments
Open

Extend envelope API to allow event-specific attachments #978

hongjiaheng opened this issue Apr 11, 2024 · 3 comments

Comments

@hongjiaheng
Copy link

hongjiaheng commented Apr 11, 2024

Doesn't anyone have this need? Attach specific files when sending events. Currently, the SDK only provides a global interface for attaching files:
image

Is there a way to attach different files for different events? I think the SDK support this, but it hasn't exposed the corresponding interface, because now it only provide one header file called sentry.h, but there are some userfull function define in sentry_envelope.h i cannot use it.
image

@supervacuus
Copy link
Collaborator

Hi @hongjiaheng. While we expose some envelope interfaces in our header, these mainly deal with loading events/transactions from persisted envelopes.

Exposing envelopes in the send path would require opening up either with another
envelope-centered hook or splitting that path and exposing the parts to the public API.

This would allow users to extend the envelope further after we applied scope-related changes (including global attachments) and invoked the before_send() hook. Then, it would make sense to expose further envelope-related interfaces in the public API to allow, for instance, event-specific attachments.

Let's leave this here so users can vote.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 12, 2024
@supervacuus supervacuus changed the title how to attach different files for different events Extend envelope API to allow event-specific attachments Apr 12, 2024
@hongjiaheng
Copy link
Author

Thanks for your reply. I think this is a important requirement. I asked my Android colleagues, and their Sentry SDK supports this feature.

@hongjiaheng
Copy link
Author

android sdk:
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

3 participants