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

Support sending a serialized envelope via Transport #381

Closed
kornelski opened this issue Oct 29, 2021 · 4 comments · Fixed by #456
Closed

Support sending a serialized envelope via Transport #381

kornelski opened this issue Oct 29, 2021 · 4 comments · Fixed by #456

Comments

@kornelski
Copy link
Contributor

kornelski commented Oct 29, 2021

I need to report errors from a process that runs in an off-line sandbox, without its own access to a network. The process can serialize and pass on messages to be sent from another process (like Chrome Renderer helper and Chrome root process). Related to #281

Sentry supports pluggable Transport which can be used to capture an Envelope, and Envelope supports serialization via to_writer, so I can move it between processes easily. However, the Transport trait can't send a serialized &[u8] representation of the envelope, so I can't reuse Sentry's implementation of networked transports. I need to reinvent the whole transport logic myself, including retry-after and rate limiting logic, which I'd rather not duplicate.

  • Could you extend the Transport trait to support sending of an already-serialized envelope from &[u8] or Vec<u8> representation?

  • Or, could you make it possible to parse Envelope object back from its serialized representation, so that I can feed it back to a Transport?

  • Alternatively, could you make TransportThread public, so I would only need to copy-paste only the easy parts of an http client implementation?

@Swatinem
Copy link
Member

Swatinem commented Nov 2, 2021

I think one way to solve this would be to create a "raw" Envelope, similar to what we have in sentry-native.

Also, I wanted to expose the retry-after and rate-limiting logic so that it can be reused by third parties. I think we will be doing that soon-ish.

@kamilogorek
Copy link
Contributor

@Swatinem please ping me once it's decided and implemented, so I'll pull this down to sentry-cli as well :)

@smeubank
Copy link
Member

@Swatinem any update on this? We added this to our sentry-cli roadmap #1168

@Swatinem
Copy link
Member

We haven’t planned for this yet. However I don’t expect this to be a huge change.

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

Successfully merging a pull request may close this issue.

4 participants