Closed moooofly closed 6 years ago
Thanks for this report @moooofly, what version of OpenCensus-Go are you using?
Firstly, please do go get -u -v go.opencensus.io/...
and then afterwards if that fails, let's file an issue on OpenCensus-Go https://github.com/census-instrumentation/opencensus-go as this issue is from that repository
After go get -u -v go.opencensus.io/...
, still get this error message as above.
[#251#root@ubuntu-1604 /go/src/go.opencensus.io]$git branch
another_way
comment_and_test
* master
[#252#root@ubuntu-1604 /go/src/go.opencensus.io]$git lg1 -1
* 1eb9a13 - (4 days ago) set countFormatter param to int64 (#948) — Philippe MARTIN (HEAD -> master, origin/master, origin/HEAD)
[#253#root@ubuntu-1604 /go/src/go.opencensus.io]$
@odeke-em
Thanks for the confirmation @moooofly, please let me know if this patch on go.opencensus.io/zpages
fixes it for you
diff --git a/zpages/rpcz.go b/zpages/rpcz.go
index 30193d1..158ea15 100644
--- a/zpages/rpcz.go
+++ b/zpages/rpcz.go
@@ -170,9 +170,9 @@ type statSnapshot struct {
// TODO: compute hour/minute values from cumulative
Method string
Received bool
- CountMinute int
- CountHour int
- CountTotal int
+ CountMinute int64
+ CountHour int64
+ CountTotal int64
AvgLatencyMinute time.Duration
AvgLatencyHour time.Duration
AvgLatencyTotal time.Duration
@@ -185,9 +185,9 @@ type statSnapshot struct {
OutputRateMinute float64
OutputRateHour float64
OutputRateTotal float64
- ErrorsMinute int
- ErrorsHour int
- ErrorsTotal int
+ ErrorsMinute int64
+ ErrorsHour int64
+ ErrorsTotal int64
}
type methodKey struct {
@@ -267,7 +267,7 @@ func (s snapExporter) ExportView(vd *view.Data) {
}
for _, tag := range row.Tags {
if tag.Key == ocgrpc.KeyClientStatus && tag.Value != "OK" {
- s.ErrorsTotal += int(count)
+ s.ErrorsTotal += int64(count)
}
}
@@ -281,7 +281,7 @@ func (s snapExporter) ExportView(vd *view.Data) {
s.InputRateTotal = computeRate(0, sum)
case ocgrpc.ClientSentMessagesPerRPCView:
- s.CountTotal = int(count)
+ s.CountTotal = int64(count)
s.RPCRateTotal = computeRate(0, count)
case ocgrpc.ClientReceivedMessagesPerRPCView:
@@ -294,7 +294,7 @@ func (s snapExporter) ExportView(vd *view.Data) {
}
for _, tag := range row.Tags {
if tag.Key == ocgrpc.KeyServerStatus && tag.Value != "OK" {
- s.ErrorsTotal += int(count)
+ s.ErrorsTotal += int64(count)
}
}
@@ -305,7 +305,7 @@ func (s snapExporter) ExportView(vd *view.Data) {
s.OutputRateTotal = computeRate(0, sum)
case ocgrpc.ServerReceivedMessagesPerRPCView:
- s.CountTotal = int(count)
+ s.CountTotal = int64(count)
s.RPCRateTotal = computeRate(0, count)
case ocgrpc.ServerSentMessagesPerRPCView:
If it does, please file a bug on OpenCensus-Go letting them know that the last PR needs to have been completed with changing those values from int to int64
Thank you @moooofly for the patience! I've filed a bug at OpenCensus-Go in https://github.com/census-instrumentation/opencensus-go/issues/951 and then submitted PR https://github.com/census-instrumentation/opencensus-go/pull/952 to fix the problem. When that PR is merged I'll ping you and then you can update your version of go.opencensus.io/zpages
and all should then be good.
Thank you @odeke-em , the patch above do work well, sorry for update late.
Alright, this change is updated in https://github.com/census-instrumentation/opencensus-go/pull/952, please get the latest OpenCensus-Go and it should be fixed. Thanks for reporting this.
As the following shows:
it is from here