Skip to content

Commit 70f69e9

Browse files
authored
Publish standard grpc.io metrics. (#201)
* Publish standard grpc.io metrics. We were publishing a different version with an extra label, but had kept the upstream name of the metrics. This makes querying this metric across different components harder (or impossible). This drops the grpc_client_status label from most metrics, but it shouldn't be a big loss, since metrics like request size are rarely correlated with an error. * Use default orgrpc views.
1 parent db19050 commit 70f69e9

File tree

1 file changed

+1
-35
lines changed
  • cmd/stackdriver-prometheus-sidecar

1 file changed

+1
-35
lines changed

cmd/stackdriver-prometheus-sidecar/main.go

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -104,41 +104,7 @@ func init() {
104104
panic(err)
105105
}
106106
if err := view.Register(
107-
&view.View{
108-
Measure: ocgrpc.ClientSentBytesPerRPC,
109-
Name: "grpc.io/client/sent_bytes_per_rpc",
110-
Description: "Distribution of bytes sent per RPC, by method.",
111-
TagKeys: []tag.Key{ocgrpc.KeyClientMethod, ocgrpc.KeyClientStatus},
112-
Aggregation: sizeDistribution,
113-
},
114-
&view.View{
115-
Measure: ocgrpc.ClientReceivedBytesPerRPC,
116-
Name: "grpc.io/client/received_bytes_per_rpc",
117-
Description: "Distribution of bytes received per RPC, by method.",
118-
TagKeys: []tag.Key{ocgrpc.KeyClientMethod, ocgrpc.KeyClientStatus},
119-
Aggregation: sizeDistribution,
120-
},
121-
&view.View{
122-
Measure: ocgrpc.ClientRoundtripLatency,
123-
Name: "grpc.io/client/roundtrip_latency",
124-
Description: "Distribution of round-trip latency, by method.",
125-
TagKeys: []tag.Key{ocgrpc.KeyClientMethod, ocgrpc.KeyClientStatus},
126-
Aggregation: latencyDistribution,
127-
},
128-
&view.View{
129-
Measure: ocgrpc.ClientRoundtripLatency,
130-
Name: "grpc.io/client/completed_rpcs",
131-
Description: "Count of RPCs by method and status.",
132-
TagKeys: []tag.Key{ocgrpc.KeyClientMethod, ocgrpc.KeyClientStatus},
133-
Aggregation: view.Count(),
134-
},
135-
&view.View{
136-
Measure: ocgrpc.ClientServerLatency,
137-
Name: "grpc.io/client/server_latency",
138-
Description: "Distribution of server latency as viewed by client, by method.",
139-
TagKeys: []tag.Key{ocgrpc.KeyClientMethod, ocgrpc.KeyClientStatus},
140-
Aggregation: latencyDistribution,
141-
},
107+
ocgrpc.DefaultClientViews...
142108
); err != nil {
143109
panic(err)
144110
}

0 commit comments

Comments
 (0)