-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Feat: Add client reports #1982
Feat: Add client reports #1982
Conversation
sentry/src/main/java/io/sentry/clientreport/LockingClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/ClientReportRecorder.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## 6.x.x #1982 +/- ##
============================================
+ Coverage 80.73% 80.81% +0.07%
- Complexity 3051 3125 +74
============================================
Files 220 228 +8
Lines 11266 11597 +331
Branches 1506 1551 +45
============================================
+ Hits 9096 9372 +276
- Misses 1603 1646 +43
- Partials 567 579 +12
Continue to review full report at Codecov.
|
sentry/src/main/java/io/sentry/clientreport/ClientReportRecorderImpl.java
Outdated
Show resolved
Hide resolved
...apache-http-client-5/src/main/java/io/sentry/transport/apache/ApacheHttpClientTransport.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
...apache-http-client-5/src/main/java/io/sentry/transport/apache/ApacheHttpClientTransport.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/ClientReportKey.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/ClientReportKey.java
Outdated
Show resolved
Hide resolved
Retryables happen on startup where counts are 0 so no need. Also it would have to prevent double restoring from persisted envelopes that retry multiple times.
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.
This is a high-level review of the code. I didn't look at any tests or too close to the code. Overall this PR looks great. Thanks for doing this @adinauer 👏
...apache-http-client-5/src/main/java/io/sentry/transport/apache/ApacheHttpClientTransport.java
Outdated
Show resolved
Hide resolved
...apache-http-client-5/src/main/java/io/sentry/transport/apache/ApacheHttpClientTransport.java
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/AtomicClientReportStorage.java
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/LockingClientReportStorage.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/clientreport/ClientReportStorage.java
Outdated
Show resolved
Hide resolved
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.
Nothing to add.
If It's ok having a Classes that are not used outside of the client report can be package-private. Public methods that are in public classes and need to be used in different packages, can also be marked as internal with annotations, e.g. @bruno-garcia opinions? |
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.
Didn't see any issues from a high-level perspective. Thanks for doing this 💪
📜 Description
Adds recording discarded events and sending them with client reports to
Sentry. Discarded events give insight into where the SDK drops certain
events like, for example, beforeSend or rate limiting.
💡 Motivation and Context
Fixes #1894
💚 How did you test it?
Unit tests, Emulator, Some local load testing to ensure counts are correct when hit from multiple threads
📝 Checklist
🔮 Next steps