I would like to use pprof labels, but it seems like I would need to pass a 
`context.Context` into all new goroutines and re-call pprof.Do at each of 
these stages. Am I mistaken here.

specifically if we had

unc handleFoo(ctx context.Context) {
    pprof.Do(ctx, pprof.Labels("foo"), func(ctx context.Context) {
        go interestingFunc()
    })
}

My understanding is that `interestingFunc` would not be profiled with the 
‘foo’ label.
If this is correct it presents a problem that I can’t group profiles under 
a label when I don’t control the spawning of goroutines myself.
i.e. if a library spawns goroutines the work they do will simply appear 
under the global profile

-- 
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.

Reply via email to