3 ms·
> Only log actionable items Easy to say but much harder to implement. For example, if you communicate with another service, a few network errors are usually no
by gbog 10y ago
> Only log actionable items
Easy to say but much harder to implement. For example, if you communicate with another service, a few network errors are usually not actionable and you'd have some fallback mechanism in you code. But tons of network errors (e.g. > 20%) is a problem that needs to be fixed now. So would you log the network error or not?
- lmm 10y agoSet a threshold, and log only once you hit that threshold.
- softawre 10y agoAnd keep track of that state across 20 different instances? What we do is just log the failure and have a system like New Relic monitoring everything so that it can alert us when we hit 20% network failure.
- lmm 10y agoSure - but then the developer-facing "log" is the New Relic interface, and your instances transmit failure information to it via some API (I mean I suppose you could have one program output a plain-text log file and then another program or service parse that to figure out how many errors were happening, but you wouldn't do that for any other kind of inter-system communication).