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

Reduce stdout log volume #400

Open
tillrohrmann opened this issue May 16, 2023 · 4 comments
Open

Reduce stdout log volume #400

tillrohrmann opened this issue May 16, 2023 · 4 comments
Assignees
Milestone

Comments

@tillrohrmann
Copy link
Contributor

tillrohrmann commented May 16, 2023

Current ideas:

  • Introduce a mechanism to log per-request spans only on debug mode, but keeping them at info level for tracing.
  • Mark per-request log events via an attribute that the tracing subscriber subscribes to and that the stdout logger can opt-in to.
@tillrohrmann tillrohrmann changed the title Introduce a mechanism to log per-request spans only on debug mode, but keeping them at info level for tracing Reduce stdout log volume May 16, 2023
@slinkydeveloper slinkydeveloper self-assigned this May 16, 2023
@slinkydeveloper slinkydeveloper added this to the 1B milestone May 22, 2023
@slinkydeveloper
Copy link
Contributor

slinkydeveloper commented May 22, 2023

So I did some investigation on the subject. In theory, given this bug is fixed, one could easily build filters such as:

  • restate[{restate.invocation.sid}]=warn,restate=info: enables >= warn logging for all logs related to specific invocations, but keeps all the other restate logs at info level.
  • restate[{restate.invocation.sid}]=off,restate=info: completely disables logs related to specific invocations.

I would like to possibly move ahead with this solution as it's far more flexible than adding any custom built flag ourselves (plus i'm not even sure such a solution would work given what i read on that issue), and we can easily provide some examples to describe how to set this up. Problem is, we need this fix :) tokio-rs/tracing#2095

@tillrohrmann
Copy link
Contributor Author

Any ETA on the fix for the bug?

What would be the default log filter then?

@slinkydeveloper
Copy link
Contributor

Any ETA on the fix for the bug?

Can't say. We can use a fork in the meantime i guess.

What would be the default log filter then?

Not sure, let's see when we get to it. Perhaps by default we do restate[{restate.invocation.sid}]=warn,restate=info,warn and then specify in the log lines how to improve it.

@tillrohrmann
Copy link
Contributor Author

Ok, sounds good to me. I guess the important bit is to properly document how to configure the log filter to get the desired behavior.

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

No branches or pull requests

2 participants