Revert "Minor gRPC fixes (2.0) (#1951)" (#1956)

This reverts commit c30057f99d.
This commit is contained in:
Tim Quinn
2020-06-09 17:06:28 -05:00
committed by GitHub
parent c30057f99d
commit cfae9e2de2
3 changed files with 45 additions and 27 deletions

View File

@@ -367,6 +367,22 @@ public final class MetricsSupport implements Service {
.withUnit(MetricUnits.NONE)
.build());
vendor.counter(Metadata.builder()
.withName("grpc.requests.count")
.withDisplayName("Total number of gRPC requests")
.withDescription("Each gRPC request (regardless of the method) will increase this counter")
.withType(MetricType.COUNTER)
.withUnit(MetricUnits.NONE)
.build());
vendor.meter(Metadata.builder()
.withName("grpc.requests.meter")
.withDisplayName("Meter for overall gRPC requests")
.withDescription("Each gRPC request will mark the meter to see overall throughput")
.withType(MetricType.METERED)
.withUnit(MetricUnits.NONE)
.build());
rules.any((req, res) -> {
totalCount.inc();
totalMeter.mark();