census-instrumentation / opencensus-go

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

prometheus le label not worked as expected #1249

Closed ray2011 closed 2 years ago

ray2011 commented 3 years ago

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

go.opencensus.io v0.22.2

What version of Go are you using?

go version go1.15.2 linux/amd64

What did you do?

v := &view.View{
        Name:        s.Name(),
        Measure:     s,
        Description: s.Description(),
        Aggregation: view.Distribution([1,2,3]),
        TagKeys:     tags,
    }

prometheus le label means less or equal, when record 1, the expext result is:

xxx{path="",le="1"} 1 xxx{path="",le="2"} 1 xxx{path="",le="3"} 1 xxx{path="",le="+Inf"} 1

however, the result is xxx{path="",le="1"} 0 xxx{path="",le="2"} 1 xxx{path="",le="3"} 1 xxx{path="",le="+Inf"} 1

I think the code below should be <= image