-
Notifications
You must be signed in to change notification settings - Fork 250
Open
Description
Hi!
When prometheus metrics handler fails for any reason (e.g. BrokenPipeError), it prints the error to the logs. Such errors are "unstructured", meaning that consumer of the logs (like AWS CloudWatch or Google Cloud Logs) treats each line independently, is inconvenient.
It would be an improvement if the stack traces would be logged using a proper python logging.Logger instead of print. The print is a part of the socketserver here, so it's hard to change right away. But, there could be a wrapper around MetricsHandler (here), invoked here, that would catch the exceptions and log them appropriately (and would swallow the exception instead of raiseing it).
How does that sound?
Thanks!
Related
Metadata
Metadata
Assignees
Labels
No labels