generated from TrueCloudLab/basic
[#20] metrics: Add grpc msg send metrics
All checks were successful
DCO action / DCO (pull_request) Successful in 28s
Tests and linters / Tests (pull_request) Successful in 36s
Tests and linters / Tests with -race (pull_request) Successful in 1m2s
Tests and linters / Lint (pull_request) Successful in 1m33s
Tests and linters / Staticcheck (pull_request) Successful in 1m40s
All checks were successful
DCO action / DCO (pull_request) Successful in 28s
Tests and linters / Tests (pull_request) Successful in 36s
Tests and linters / Tests with -race (pull_request) Successful in 1m2s
Tests and linters / Lint (pull_request) Successful in 1m33s
Tests and linters / Staticcheck (pull_request) Successful in 1m40s
Streaming RPC has two main metrics: send message and receive message. But the first one was missed. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
ec6f880337
commit
d34e1329c8
1 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,9 @@ var clientMetrics = grpcprom.NewClientMetrics(
|
||||||
grpcprom.WithClientStreamRecvHistogram(
|
grpcprom.WithClientStreamRecvHistogram(
|
||||||
grpcprom.WithHistogramBuckets(prometheus.DefBuckets),
|
grpcprom.WithHistogramBuckets(prometheus.DefBuckets),
|
||||||
),
|
),
|
||||||
|
grpcprom.WithClientStreamSendHistogram(
|
||||||
|
grpcprom.WithHistogramBuckets(prometheus.DefBuckets),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -57,6 +60,12 @@ func init() {
|
||||||
Help: "Histogram of response latency (seconds) of the gRPC single message receive.",
|
Help: "Histogram of response latency (seconds) of the gRPC single message receive.",
|
||||||
VariableLabels: []string{"grpc_type", "grpc_service", "grpc_method"},
|
VariableLabels: []string{"grpc_type", "grpc_service", "grpc_method"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "grpc_client_msg_send_handling_seconds",
|
||||||
|
Type: dto.MetricType_HISTOGRAM.String(),
|
||||||
|
Help: "Histogram of response latency (seconds) of the gRPC single message send.",
|
||||||
|
VariableLabels: []string{"grpc_type", "grpc_service", "grpc_method"},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
metrics.MustRegister(clientMetrics, descs...)
|
metrics.MustRegister(clientMetrics, descs...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue