On 2017-08-14 18:36, dc0d wrote: > Another question that I failed to answer properly (by myself) is: are > metrics same as logs? Or they are a higher level concept (which also can > be logged)? And should logging be in charge of delivering metrics (seems > it can be)?
Depends... I guess. I implemented both (in https://github.com/One-com/gone/) and the strategies are somewhat different. Mostly due to performance requirements. For instance.. metrics are often something you would be more likely to call in a hot path than logging (which is mostly errors). And I think it's sad to have a fine metrics library which you tend to not use in the places which could be really interesting only because it's too expensive. For error-logging you are mostly not concerned with performance, however, debug-logging is somewhat like metrics in that regard. You don't want to discourage it because your debug-log call is really expensive. For debug-logging that could however be solved with a compile time switch as many logging libraries do. /Peter -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.