sentry-rust icon indicating copy to clipboard operation
sentry-rust copied to clipboard

Make it easier to create your own transport implementation

Open thomaseizinger opened this issue 4 weeks ago • 6 comments

Problem Statement

I am currently writing my own transport implementation and would like to reuse the tokio-thread and rate limiter modules from sentry.

Solution Brainstorm

Solution 1: Publicly expose these modules

Pro: Very easy to do Con: Sem-ver liability because it increases API surface

Solution 2: Create a dedicated sentry-transport crate

Pro: Can be versioned independently of the main crate, no additional API surface for sentry Con: Requires a bit more work

thomaseizinger avatar Nov 26 '25 00:11 thomaseizinger

RUST-129

linear[bot] avatar Nov 26 '25 00:11 linear[bot]

Thanks for the suggestion, we'll evaluate how this could be improved.
Could you share why you need to implement your own transport? Is there anything that's not working with the built-in ones?

lcian avatar Nov 28 '25 16:11 lcian

Could you share why you need to implement your own transport? Is there anything that's not working with the built-in ones?

We are using Sentry in @firezone and in order to not create routing loops, I need to control the creation of the underlying socket. We have our own abstraction for that and I built an HTTP2 client on top of it.

Thanks for the suggestion, we'll evaluate how this could be improved.

If I had to maintain this workspace, I'd create a dedicated crate which is used by the Sentry transports but not exposer publicly to make sure it is not a semver liability.

thomaseizinger avatar Nov 29 '25 10:11 thomaseizinger

Hi @thomaseizinger, I think we will go with publicly exposing the modules. I have added this issue to our internal backlog — if you would like it to be available sooner, you are welcome to submit a PR.

szokeasaurusrex avatar Dec 02 '25 15:12 szokeasaurusrex

Okay cool, thanks for the quick decision. I'll put up a PR in a bit. I also have a small change request but we can discuss that separately.

thomaseizinger avatar Dec 02 '25 21:12 thomaseizinger

I opened two PRs for this: #949 & #950

thomaseizinger avatar Dec 09 '25 03:12 thomaseizinger