Bug: minimum and maximum are swapped
EvelineV opened this issue · 1 comments
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
contrib.go.opencensus.io/exporter/stackdriver v0.12.4
go.opencensus.io v0.22.0
What version of Go are you using?
Go 1.12
What did you do?
Read the code
What did you expect to see?
I expected the minimum of the DistributionData to be zero and the maximum to be MaxFloat
What did you see instead?
It's the other way around: https://github.com/census-instrumentation/opencensus-go/blob/master/stats/view/aggregation_data.go#L137
Additional context
I can't open a pull request since I need to have my employer review the contributor license agreement first. I was hoping you could just fix it
I think this is working as intended. That min/max describes the data seen so far, so the value of min should initially be maxfloat. Once data is added, min will be lowered to whatever the smallest sample is.