-
Notifications
You must be signed in to change notification settings - Fork 21
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
senders: Mitigate issue with GCP logging quota #171
Conversation
df36f93
to
76c1461
Compare
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.
Great work, just a few suggestions.
GCP quotas page for the logging v2(https://cloud.google.com/logging/quotas) specifies that a LogEntry should have at maximum 256KB in size, that is not a hard limit, but an estimation. In anycase we should check if any of our LogEntry objects are bigger than the quota allows and not send those logs. Instead we try to truncate the message to smaller size and if that isn't enough we send a default log message.
76c1461
to
95d94d7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #171 +/- ##
==========================================
+ Coverage 63.32% 63.47% +0.15%
==========================================
Files 19 19
Lines 2094 2100 +6
==========================================
+ Hits 1326 1333 +7
+ Misses 768 767 -1
|
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
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
https://cloud.google.com/logging/quotas
WHAT
This PR is doing two things:
LogEntry
that is bigger than 256K