High throughput transport implementation#1114
Conversation
…1118) Flip the relation between `AsyncConnection` and `ITransport` and make `BlockingHttpTransport` use `HttpConnection`, making it possible to provide alternative transport implementations not bound to use thread pool.
Codecov Report
@@ Coverage Diff @@
## main #1114 +/- ##
============================================
- Coverage 74.95% 74.64% -0.32%
+ Complexity 1612 1605 -7
============================================
Files 166 167 +1
Lines 5603 5609 +6
Branches 548 550 +2
============================================
- Hits 4200 4187 -13
- Misses 1150 1164 +14
- Partials 253 258 +5
Continue to review full report at Codecov.
|
|
|
||
| URL sentryUrl; | ||
| try { | ||
| sentryUrl = parsedDsn.getSentryUri().toURL(); |
There was a problem hiding this comment.
Ideally we'd do this eagerly (after init) so we throw at that point and crash.
Once the SDK inits we should capture all exceptions and log it out
There was a problem hiding this comment.
It is done with init. If DSN is wrong SDK init will fail.
This piece will be refactored anyways in subsequent PR as every transport needs an envelope url, so there is no point for each factory to resolve it by itself.
| envelopeCache.discard(envelope); | ||
| } | ||
| } else { | ||
| executor.submit(new EnvelopeSender(filteredEnvelope, hint, currentEnvelopeCache)); |
There was a problem hiding this comment.
What happens if we capture in a tight loop, executor drops after maxItems?
There was a problem hiding this comment.
Yes, in such case once we reach max queue items are dropped.
|
any blockers for merging this? |
|
It's a PR for branch that takes all the NIO related changes in. Once #1136 is approved, this whole feature is complete and we can merge this PR too. |
|
#1136 is merged. Please do a final review of this PR. |
📢 Type of change
📜 Description
Provides high throughput transport implementation meant to be used by backend applications using the performance feature.
Extracts rate limiting functionality to separate class, making it possible to use from other implementation of
ITransport.💡 Motivation and Context
Fixes #1097.
TransportFactoryas a top level interface that can be set onSentryOptions- to provide an easy way to set custom transportsThe last two are in the PR pending review (#1136).
💚 How did you test it?
Unit & integration tests.
📝 Checklist
🔮 Next steps