On Fri, Jan 22, 2016 at 02:15:29AM +0000, Johan Sim wrote:
> That part seems to be pretty clear to me now. So I would say trace is
> recommended for 'logging' for a single request and logging is for
> process-wide.
Apologies for the slight hijacking of this, but I think this is related:
If a request goes through several different go-routines as necessary to
service it, it would be quite neat to group all those actions together.
I have been thinking about creating one logger per request. This would
make it much easier to see the entire path a single request goes through
rather than what I have currently which is that logging is done per
go-routine/service rather than per request. Is this a case where tracing
is better suited?
I'm thinking more of the Erlang tracing stuff where a particular message
gets tagged with a magic value and then any process that creates and
sends a message in response to receiving a tagged message also has that
message tagged. That way you can see the entire rippling chain of events
caused by the first tagged msg.
Matthew