back

by jasonpeacock·3y ago·view on hn ↗
Logs should be the input to generate metrics (in addition to any metrics published directly).

Otherwise, it's hard to convert a stack trace into a metric ;) But you can process the logs to generate a metric about the frequency of stack traces.

Ditto for logs telling you "user Foo doesn't have permissions for that operation". Again, you can make a metric about "user permissions failure" but you still need the log to know that it was user Foo.

1 comments
If you need a metric on the frequency of stack traces, you have a way more serious problem than structuring your logs.
Or you are working for people with such a problem.