-
Notifications
You must be signed in to change notification settings - Fork 2
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
Introduced relative priorities for log levels #15
base: master
Are you sure you want to change the base?
Conversation
Discard logs with priority lower than specified
Alexey Kudinkin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This functionality is not called priority. This should be called A priority system works with the reservoir sampler and provides priority to various logs that don't fit in the reservoir. For example, larch can be configured to only allow 20 loglines per 50ms bucket. With a priority system it would look at the N>20 logs that happened in the 50ms bucket and pick 20 loglines based on priority instead of being based on random sampling. |
@Raynos that's a fair point, the naming is misleading. This change was mostly a stop-gap to allow to discard logs early rather than postpone it for logtron to go through multiple layers of caching/serialization. Just for a bit of a context: we ultimately had decided to migrate off larch/logtron and instead rely on pinojs synchronously writing to stdout, so likely to start sunsetting support for larch/logtron. |
The concept of larch is still useful to port to pino btw. This class in particular ( https://github.com/uber-common/larch/blob/master/reservoir-backend.js ). But it would benefit from just re-impementation in a wrapper around |
Can we close out this PR for lack of activity. |
Introduced relative priorities for log levels
Discard logs with priority lower than specified