Repository navigation
Make ITransport and SentryOptions.Transport public - #1602
Merged
Merged
Conversation
Was unnecessary. Only the CachingTransport is ever flushed, right after it's created.
mattjohnsonpint
requested review from
SimonCropp and
bruno-garcia
as code owners
April 26, 2022 22:41
SimonCropp
approved these changes
Apr 26, 2022
This was referenced Apr 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
HttpTransportBaseclass, containing the "guts" of theHttpTransportassembled 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 ofIBackgroundWorkerwhere 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 correspondingITransporttype public so that can happen. (It also removesIFlushableTransportjust 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
ITransportwithout implementingHttpTransportBase, but then they would be missing out on any functionality wired up in the transport such as processing event handlers, client reports, etc.