-
-
Notifications
You must be signed in to change notification settings - Fork 226
Make HttpTransport public (for other SDKs) #1553
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
Conversation
544ff51 to
a677b87
Compare
Codecov Report
@@ Coverage Diff @@
## main #1553 +/- ##
==========================================
+ Coverage 82.78% 82.80% +0.01%
==========================================
Files 219 219
Lines 7419 7421 +2
Branches 1417 1418 +1
==========================================
+ Hits 6142 6145 +3
- Misses 852 854 +2
+ Partials 425 422 -3
Continue to review full report at Codecov.
|
|
does this meet your requirements? |
|
Unfortunately not. I've tried that (see approaches in the linked sentry-unity PR description), but it doesn't work in Unity webgl because the |
| Assert.All(types, type => | ||
| { | ||
| Assert.False(type.IsPublic, $"Expected type {type.Name} to be internal."); | ||
| if (type.Name != "HttpTransport") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattjohnsonpint should we move this to Sentry.Http namespace (or other) or really open the door to have public types under the Internal namespace to 'signify' this won't follow semver.
ASP.NET Core has public types under Internal namespaces, I know as I've relied on them without noticying in the past :D
| using var processedEnvelope = ProcessEnvelope(envelope, instant); | ||
| if (processedEnvelope.Items.Count == 0) | ||
| { | ||
| _options.LogInfo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this log message was removed?
|
I have some concerns. It seems that while this would make some of the functionality in I can also see that we would then end up with two places to remember to add features and fix things. For example, I'm currently working on adding client reports (see draft PR #1556), which is adding more business logic to the background worker and the transport. These wouldn't carry over to the Unity implementation so would have to be implemented there also. I think rather than exposing In short, exposing internals smells like we're missing some interfaces or shared base classes. I'd rather refactor for that now and built on top of a stronger contract. |
mattjohnsonpint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaind - FYI, I'm working on an approach that should address my concerns and still provide what you need for Unity. I'll have a PR out shortly. Blocking this PR for now. Thanks.
|
Closing in favor of #1560 instead. |
|
@mattjohnsonpint can this branch be deleted? |
This is required to be able to reuse the logic in
HttpTransportwhile implementing a customHttpClient.Required for sentry-unity
#skip-changelog