Re: [go-nuts] Re: Using Context to store TraceIDs

2017-05-31 Thread Jesper Louis Andersen
In Erlang, we have a similar concept to the Context bag called the Process Dictionary. Its use is generally a nono because it breaks the rules for functional programming and allows you to have a shared space. We like to pass every argument explicitly in order to make it easier to read the code. Ye

Re: [go-nuts] Re: Using Context to store TraceIDs

2017-05-31 Thread William Kennedy
I have come to the same conclusion. I just needed to write it down and listen to a few people talk about it. Thanks for the response. I just want to be careful what we consider to be ok to be placed in the Context and what truly needs to be passed in as a separate argument. > On May 31, 2017, a

[go-nuts] Re: Using Context to store TraceIDs

2017-05-31 Thread Daniel Theophanes
Hi Bill, Generally if you have a Trace ID, you are also doing something that involves multiple systems, processes, or routines. If that is the case, you also need a way to cancel your resource. Thus Trace ID is included with values in the context and not separated. When Dave voiced his own pre

[go-nuts] Re: Using Context to store TraceIDs

2017-05-30 Thread William Kennedy
After reading this: https://cloudplatform.googleblog.com/2017/04/distributed-tracing-for-Go.html I can see how the Context is being used, through a separate API. Would it make sense to use a separate Context value for the "Trace" Context and use a separate Context value for the "Cancellation" C