Make ITransport and SentryOptions.Transport public #1602
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #1560, we created the
HttpTransportBase
class, containing the "guts" of theHttpTransport
assembled such that others could extend it to create their own transports without loss of features that are wired at the transport. However, we didn't create an easy way to actually attach a custom transport at that time, because we were primarily focused on getsentry/sentry-unity#657, which was already building it's own implementation ofIBackgroundWorker
where it could connect its own custom transport.For others, the ideal place to attach a custom transport is on
SentryOptions.Transport
, as we do in unit tests. This PR makes that property, and the correspondingITransport
type public so that can happen. (It also removesIFlushableTransport
just for cleanup. It wasn't adding anything.)After this is released, the recommendation for custom transports is to implement similarly to the built-in
HttpTransport
.One could also just implement
ITransport
without implementingHttpTransportBase
, but then they would be missing out on any functionality wired up in the transport such as processing event handlers, client reports, etc.