Don't send cached envelopes when rate-limiting is active#2937
Merged
romtsn merged 13 commits intofeat/observe-networkfrom Sep 28, 2023
Merged
Don't send cached envelopes when rate-limiting is active#2937romtsn merged 13 commits intofeat/observe-networkfrom
romtsn merged 13 commits intofeat/observe-networkfrom
Conversation
Contributor
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2cd49ea | 315.61 ms | 361.77 ms | 46.16 ms |
| 8b1b6fc | 316.96 ms | 365.45 ms | 48.49 ms |
| 658a82c | 309.27 ms | 365.35 ms | 56.08 ms |
| 70f6e88 | 335.72 ms | 372.84 ms | 37.12 ms |
| 4881e6a | 296.22 ms | 334.90 ms | 38.68 ms |
| 25a760c | 310.30 ms | 351.38 ms | 41.08 ms |
| 8ba4611 | 320.46 ms | 361.84 ms | 41.38 ms |
| ebdd7ec | 360.63 ms | 396.29 ms | 35.65 ms |
| a5f58d4 | 341.46 ms | 390.80 ms | 49.34 ms |
| e2339ee | 392.50 ms | 466.21 ms | 73.71 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2cd49ea | 1.72 MiB | 2.26 MiB | 548.94 KiB |
| 8b1b6fc | 1.72 MiB | 2.26 MiB | 548.34 KiB |
| 658a82c | 1.72 MiB | 2.26 MiB | 548.34 KiB |
| 70f6e88 | 1.72 MiB | 2.26 MiB | 549.33 KiB |
| 4881e6a | 1.72 MiB | 2.26 MiB | 548.34 KiB |
| 25a760c | 1.72 MiB | 2.26 MiB | 549.33 KiB |
| 8ba4611 | 1.72 MiB | 2.26 MiB | 548.94 KiB |
| ebdd7ec | 1.72 MiB | 2.26 MiB | 548.22 KiB |
| a5f58d4 | 1.72 MiB | 2.26 MiB | 548.54 KiB |
| e2339ee | 1.72 MiB | 2.26 MiB | 548.22 KiB |
Previous results on branch: feat/rate-limit-cached-envelopes
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 02dfd7c | 373.59 ms | 399.64 ms | 26.05 ms |
| e0756a9 | 367.21 ms | 441.22 ms | 74.01 ms |
| d3ab716 | 347.13 ms | 429.68 ms | 82.55 ms |
| 194fa5c | 333.24 ms | 418.40 ms | 85.15 ms |
| 376470b | 318.90 ms | 362.02 ms | 43.12 ms |
| b2aaa92 | 329.94 ms | 375.72 ms | 45.78 ms |
| 3e70915 | 390.37 ms | 483.65 ms | 93.27 ms |
| 8b0da8c | 403.04 ms | 478.96 ms | 75.92 ms |
| de39dbc | 377.41 ms | 400.90 ms | 23.49 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 02dfd7c | 1.72 MiB | 2.26 MiB | 548.74 KiB |
| e0756a9 | 1.72 MiB | 2.26 MiB | 548.71 KiB |
| d3ab716 | 1.72 MiB | 2.26 MiB | 548.93 KiB |
| 194fa5c | 1.72 MiB | 2.26 MiB | 548.71 KiB |
| 376470b | 1.72 MiB | 2.26 MiB | 548.40 KiB |
| b2aaa92 | 1.72 MiB | 2.26 MiB | 548.73 KiB |
| 3e70915 | 1.72 MiB | 2.26 MiB | 548.71 KiB |
| 8b0da8c | 1.72 MiB | 2.26 MiB | 548.72 KiB |
| de39dbc | 1.72 MiB | 2.26 MiB | 548.93 KiB |
romtsn
approved these changes
Sep 19, 2023
Member
There was a problem hiding this comment.
Looking good, only one thing - maybe we should add the delay to avoid bursting our server with a bunch of events after a while and hitting another rate-limit? Similar to how it's done in https://github.com/getsentry/sentry-cocoa/pull/2263/files
adinauer
reviewed
Sep 22, 2023
sentry/src/main/java/io/sentry/SendCachedEnvelopeFireAndForgetIntegration.java
Show resolved
Hide resolved
58adccc to
4707bd3
Compare
Codecov ReportAttention:
... and 63 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
stefanosiano
approved these changes
Sep 28, 2023
7 tasks
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.
📜 Description
Expose RateLimiter via Hub to let SendCachedEnvelope integrations decide if they should send envelopes now or later.
💡 Motivation and Context
Fixes #1926
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps