-
-
Notifications
You must be signed in to change notification settings - Fork 255
Logs: Integrate in Sentry Client #2920
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/logs #2920 +/- ##
=============================================
+ Coverage 87.68% 87.74% +0.05%
=============================================
Files 275 277 +2
Lines 9089 9133 +44
=============================================
+ Hits 7970 8014 +44
Misses 1119 1119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Got only one comment left but otherwise looks good
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 good, let's merge the batch PR and update this PR
} | ||
if (processedLog != null) { | ||
_options.logBatcher.addLog(processedLog); | ||
} |
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.
should we report a dropped log if null after the beforeSendLog
?
void addLog(SentryLog log) { | ||
_logBuffer.add(log); | ||
|
||
_flushTimer?.cancel(); |
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.
canceling the timer here means that, in theory, if a log is added every 4 seconds, we will not flush them for several minutes
Is this the expectation?
Just fyi, Java sends every 5 seconds, regardless of how many logs are there
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.
i guess it's fine as per docs, just ensuring it's wanted
📜 Description
captureLog
toSentryClient
enableLogs
toSentryOptions
BeforeSendLogCallback
toSentryOptions
💡 Motivation and Context
Relates to #2915
Relates to #2919
Closes #2922
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps
Hub & New Loggers