-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
High throughput transport implementation #1114
Conversation
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.
nice!
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.
LGTM
…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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we capture in a tight loop, executor drops after maxItems?
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.
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.
TransportFactory
as 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