Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexeykudinkin
Copy link

Introduced relative priorities for log levels
Discard logs with priority lower than specified

Discard logs with priority lower than specified
@CLAassistant
Copy link

CLAassistant commented Oct 19, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

@Raynos
Copy link
Contributor

Raynos commented Oct 22, 2019

This functionality is not called priority.

This should be called setLogLevel where we drop logs below the log level.

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.

@alexeykudinkin
Copy link
Author

@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.

@Raynos
Copy link
Contributor

Raynos commented Oct 23, 2019

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 pino

@Raynos
Copy link
Contributor

Raynos commented Mar 4, 2024

Can we close out this PR for lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants