From f5b0e0d86581cc9ff000e8af23bde5a5d6471f67 Mon Sep 17 00:00:00 2001 From: Scott Hendrickson Date: Tue, 30 Jun 2020 18:21:46 -0400 Subject: [PATCH] Comment on GRPC latency measure reuse (#1214) This reuse previously threw us for a loop. We mistakenly thought it was a copy/paste error. https://github.com/census-instrumentation/opencensus-go/issues/1214 https://github.com/census-instrumentation/opencensus-go/pull/1216 --- plugin/ocgrpc/client_metrics.go | 2 ++ plugin/ocgrpc/server_metrics.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugin/ocgrpc/client_metrics.go b/plugin/ocgrpc/client_metrics.go index abe978b67..49fde3d8c 100644 --- a/plugin/ocgrpc/client_metrics.go +++ b/plugin/ocgrpc/client_metrics.go @@ -60,6 +60,8 @@ var ( Aggregation: DefaultMillisecondsDistribution, } + // Purposely reuses the count from `ClientRoundtripLatency`, tagging + // with method and status to result in ClientCompletedRpcs. ClientCompletedRPCsView = &view.View{ Measure: ClientRoundtripLatency, Name: "grpc.io/client/completed_rpcs", diff --git a/plugin/ocgrpc/server_metrics.go b/plugin/ocgrpc/server_metrics.go index 609d9ed24..b2059824a 100644 --- a/plugin/ocgrpc/server_metrics.go +++ b/plugin/ocgrpc/server_metrics.go @@ -63,6 +63,8 @@ var ( Aggregation: DefaultMillisecondsDistribution, } + // Purposely reuses the count from `ServerLatency`, tagging + // with method and status to result in ServerCompletedRpcs. ServerCompletedRPCsView = &view.View{ Name: "grpc.io/server/completed_rpcs", Description: "Count of RPCs by method and status.",