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

Move logging to a ring buffer approach #6542

Open
ripienaar opened this issue Feb 21, 2025 · 0 comments
Open

Move logging to a ring buffer approach #6542

ripienaar opened this issue Feb 21, 2025 · 0 comments
Labels
2.12 accepted The defect or proposal as been accepted proposal Enhancement idea or proposal

Comments

@ripienaar
Copy link
Contributor

Proposed change

Today we see cases where if the logging output device blocks the entire server blocks since we are working on the assumption that logging always works and so we do it in the server hot path.

We should create a ring buffer where logs go to first and then the buffer is logged to the device in a background process.

While doing this we have some opportunities to fix related issues/requests:

  • The ring buffer should support a set of fields for each log entry, this should indicate account, connection, stream, consumer etc that produce the logs, we can then log these as structured logs if configured
  • The ring buffer should be queryable over an API with filters for above fields
  • We should also evaluate if this buffer can be leveraged to support the ability to place only a certain account/client/stream/gateway/route into debug/trace level at run time via an API

Use case

To improve server stability as well as increased visibility into behaviours with a smaller impact vs running the entire server at debug/trace

Contribution

No response

@ripienaar ripienaar added 2.12 accepted The defect or proposal as been accepted proposal Enhancement idea or proposal labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.12 accepted The defect or proposal as been accepted proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

1 participant