3 ms·
Along similar lines: I highly recommend making every metric and log in your system spelled out completely somewhere. Don't: base = "abc" s
by Groxx 2y ago
Along similar lines: I highly recommend making every metric and log in your system spelled out completely somewhere.
Don't:
base = "abc"
something = base + ".some.suffix"
Do:
something = "abc.some.suffix"
I've also had some luck with hard-coded UUIDs at call sites, e.g.:
log.Info("something", "callsite", "DECAFBAD-000...")
because it makes it absolutely trivial to find a log, and unlike caller-lines (which are great! use them too!) it doesn't change when you refactor code.