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

Refactor Envelope build & sending #643

Open
vaind opened this issue May 27, 2023 · 0 comments
Open

Refactor Envelope build & sending #643

vaind opened this issue May 27, 2023 · 0 comments

Comments

@vaind
Copy link
Collaborator

vaind commented May 27, 2023

Summary

Currently, events are handed over to transport for sending. In order to fully switch to Envelopes, transport should not know about events and instead accept envelopes for sending. Transport should also not do any event-type specific processing - all the information transport needs is contained in the Envelope & its Items. See https://develop.sentry.dev/sdk/envelopes/

Motivation

Besides finishing the move to Envelopes, the separation of concerns would allow us to build envelopes with multiple items, without hacking around events, as I've had to do in here - adding a transactionProfile field to Event and handling that in transport.go.

Additional Context

Ideally, I'd also suggest something to think about in the future - changing the APIs to not accept Event struct but rather an interface, sth. like which just knows how to serialize and deserialize itself. This would also make it more flexible and avoid adding fields specific to different event types, e.g. Transactions, as there already are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants