Hacker News new | ask | show | jobs
by paulddraper 3337 days ago
Exactly.

You run a process that exits with a non-zero code. Is that an error that should be logged? Or just informational? (E.g. `diff`.)

You request an HTTP resource that doesn't exist. Loggable error? Or normal result?

Only the caller knows.

1 comments

I recommend separating collection from instrumentation. Always instrument at the source, so that you can instrument the flow of your entire application. If the caller decides there is something about the code flow that is worth recording, it can trigger collection of the entire trace.