Reputation: 3112
I'm reading stack trace of a go program for debugging.
goroutine 6 [chan receive]:
go.elastic.co/apm.(*Tracer).loop.func2(0xc000042420, 0xc0000423c0, 0x1551980, 0xc0004da100, 0xc000074300, 0xc000001080, 0xc00000e018)
/app/vendor/go.elastic.co/apm/tracer.go:803 +0x21a
created by go.elastic.co/apm.(*Tracer).loop
/app/vendor/go.elastic.co/apm/tracer.go:800 +0x36e
goroutine 8 [chan receive, 21 minutes]:
github.com/getsentry/sentry-go.(*HTTPTransport).worker(0xc0003025b0)
/app/vendor/github.com/getsentry/sentry-go/transport.go:387 +0x77
created by github.com/getsentry/sentry-go.(*HTTPTransport).Configure.func1
/app/vendor/github.com/getsentry/sentry-go/transport.go:255 +0x3e
What does the time 21 minutes
signify in the second go routine? This time is absent from the first one. I looked up in the documentation but couldn't find what this time is for.
Upvotes: 3
Views: 649
Reputation: 58241
It's the approximate amount of time the goroutine was blocked. It is only displayed if the amount of time the goroutine was blocked is at least 1 minute.
You can look at the code that produces this output in the go runtime source, runtime/traceback.go
(linked is the go1.16.6 version of the code).
Upvotes: 5