census-instrumentation / opencensus-go

A stats collection and distributed tracing framework
http://opencensus.io
Apache License 2.0
2.05k stars 326 forks source link

Meter#Register hangs indefinitely if meter not started #1226

Open nicks opened 4 years ago

nicks commented 4 years ago

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

go.opencensus.io v0.22.4

What version of Go are you using?

go version go1.14.3 linux/amd64

What did you do?

If possible, provide a recipe for reproducing the error.

package main

import (
    "go.opencensus.io/stats/view"
)

func main() {
    meter := view.NewMeter()
    _ = meter.Register()
}

What did you expect to see?

The Register() call to return

What did you see instead?

The meter.Register call hangs forever waiting on the go channel.

I didn't find anything in the documentation that suggested I needed to call Start() before doing any Register calls

Additional context

Add any other context about the problem here.