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

Provide ability to log in a format interpretable by stackdriver/google-monitoring #30

Open
theferrit32 opened this issue Jun 15, 2021 · 1 comment

Comments

@theferrit32
Copy link
Contributor

Google monitoring can trigger alerts on a variety of metric types based on values in any arbitrary JSON field of log messages it reads. Since we log newline text to stdout/err in unstructured text, it interprets it all as INFO non-error output. Logging in the JSON format used by google monitoring will let us set proper log levels and use components of log messages in alerts, and ensure proper newline de/serialization of multi-line message payloads.

Since other projects in our ecosystem are using pedestal for logging, we should switch to that here for consistency, away from taoensso/timbre. It is a relatively simple liftover.

It appears that pedestal has the option for providing your own formatter
https://github.com/pedestal/pedestal/blob/a72c7a274af0e60ba42a18d859f7c6fe9314130e/log/src/io/pedestal/log.clj#L271

We want to preserve the ability to log in compact "human" format in development, and flip a switch to JSON format when deployed.

@KelseaChang5
Copy link

December 7th 2021 Triage: @larrybabb to rework (reformat to be an analysis task with this solution as one proposal.)

@larrybabb larrybabb removed their assignment Jul 18, 2022
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

3 participants