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

Docs: Pino Logging with Grafana Promtail/Loki #1932

Closed
janpaepke opened this issue Mar 25, 2024 · 3 comments · Fixed by #1934
Closed

Docs: Pino Logging with Grafana Promtail/Loki #1932

janpaepke opened this issue Mar 25, 2024 · 3 comments · Fixed by #1934

Comments

@janpaepke
Copy link
Contributor

I recently spent way to much time to get Promtail and Loki to consume our pino logs in a way that I found satisfactory.
Since logs, which aren't processed or read by anything are basically useless, this should be fairly common challenge.

Information about setting this up properly is surprisingly hard to find, which is why, when I finally made it work, I decided to write an article about it.

I humbly present it here, A for feedback and B so it might be helpful to other pino users.
https://medium.com/@janpaepke/structured-logging-in-the-grafana-monitoring-stack-8aff0a5af2f5

If the maintainers agree this may be useful information, we could also consider linking it in the package docs somewhere.

@mcollina
Copy link
Member

Would you like to add a link to that page in our help section?

I've used pino-loki with great satisfaction as well.

@janpaepke
Copy link
Contributor Author

pino-loki is really well made but as explained in the article it follows a different paradigm.

In our setup a service should not be concerned with log consumption, much less be tied to a loki instance/config.
In short: Logs should be pull, rather than push.

Regarding the link, I'd be happy to add a PR. Wanted to make sure it's useful first. 🙂

janpaepke added a commit to janpaepke/pino that referenced this issue Mar 26, 2024
This adds helpful information a the usecase of using the Grafana monitoring stack for evaluating pino logs.

Resolves pinojs#1932
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants