opencensus-go-exporter-stackdriver icon indicating copy to clipboard operation
opencensus-go-exporter-stackdriver copied to clipboard

Field timeSeries[0].points[0].distributionValue had an invalid value: Distribution value has 15 |bucket_counts| fields, which is more than the 14 buckets allowed by the bucketing options.

Open DazWilkin opened this issue 5 years ago • 3 comments

Indirectly via trying the Stackdriver Exporter with OpenCensus agent: https://github.com/census-instrumentation/opencensus-service/issues/456#issuecomment-472109142

There appears to be an issue using view.Distribution[s]:

Failed to export to Stackdriver: rpc error: code = InvalidArgument desc = Field timeSeries[0].points[0].distributionValue had an invalid value: Distribution value has 15 |bucket_counts| fields, which is more than the 14 buckets allowed by the bucketing options.

Regardless of the number of buckets chosen, the error will be:

Distribution values has {X} [bucket_counts| fields, which is more than the {X-1} buckets allowed by the bucketing options

Repro: -- Use the Golang Stackdriver Exporter sample; fix its bugs (#99) :-( -- Run it and observe the errors

GOOGLE_APPLICATION_CREDENTIALS=$PWD/secrets/opencensus.key.json \
go run github.com/DazWilkin/opencensus
2019/03/12 11:57:23 Setting Stackdriver default location failed: Get http://169.254.169.254/computeMetadata/v1/instance/zone: dial tcp 169.254.169.254:80: i/o timeout
> The quick brown fox jumps over the lazy dog
< THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

> 2019/03/12 11:57:33 Failed to export to Stackdriver: rpc error: code = InvalidArgument desc = Field timeSeries[0].points[0].distributionValue had an invalid value: Distribution value has 16 |bucket_counts| fields, which is more than the 15 buckets allowed by the bucketing options.
How many times does the fox jump over the dog?
< HOW MANY TIMES DOES THE FOX JUMP OVER THE DOG?

> 2019/03/12 11:57:42 Failed to export to Stackdriver: rpc error: code = InvalidArgument desc = Field timeSeries[0].points[0].distributionValue had an invalid value: Distribution value has 15 |bucket_counts| fields, which is more than the 14 buckets allowed by the bucketing options.

DazWilkin avatar Mar 12 '19 18:03 DazWilkin

workaround is to remove bucket with 0 bounds.

rghetia avatar Mar 16 '19 07:03 rghetia

Thank you! I noticed removal of the "0" bucket in the code and had wondered whether that was a solution but forgot to try it. Thank you @rghetia

DazWilkin avatar Mar 16 '19 14:03 DazWilkin

Any plan to fix this issue?

Philmod avatar Apr 29 '20 13:04 Philmod