aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhcpp <hcpp@ydb.tech>2023-11-15 10:32:26 +0300
committerhcpp <hcpp@ydb.tech>2023-11-15 10:55:56 +0300
commit9a4db18d5d2c39747c842dd293ccd5e7eb2fdb00 (patch)
tree33d55b9c9b796a7ed87972e93711cbe0b6ee46e3
parent351c5f640a103d19f8f45c3f2087c4d7a4858299 (diff)
downloadydb-9a4db18d5d2c39747c842dd293ccd5e7eb2fdb00.tar.gz
metrics have been improved
-rw-r--r--ydb/library/yql/providers/generic/connector/app/server/grpc_metrics.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ydb/library/yql/providers/generic/connector/app/server/grpc_metrics.go b/ydb/library/yql/providers/generic/connector/app/server/grpc_metrics.go
index de71f7167c..9fbcd56c60 100644
--- a/ydb/library/yql/providers/generic/connector/app/server/grpc_metrics.go
+++ b/ydb/library/yql/providers/generic/connector/app/server/grpc_metrics.go
@@ -24,6 +24,8 @@ func UnaryServerMetrics(registry metrics.Registry) grpc.UnaryServerInterceptor {
solomon.Rated(requestDuration)
solomon.Rated(panicsCount)
solomon.Rated(statusCount)
+ solomon.Rated(requestBytes)
+ solomon.Rated(responseBytes)
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (_ any, err error) {
deferFunc := func(startTime time.Time, opName string) {
@@ -88,7 +90,7 @@ func StreamServerMetrics(registry metrics.Registry) grpc.StreamServerInterceptor
streamCount := registry.CounterVec("streams_total", []string{"protocol", "endpoint"})
streamDuration := registry.DurationHistogramVec("stream_duration_seconds", metrics.MakeExponentialDurationBuckets(250*time.Microsecond, 1.5, 35), []string{"protocol", "endpoint"})
inflightStreams := registry.GaugeVec("inflight_streams", []string{"protocol", "endpoint"})
- panicsCount := registry.CounterVec("panics_total", []string{"protocol", "endpoint"})
+ panicsCount := registry.CounterVec("stream_panics_total", []string{"protocol", "endpoint"})
sentStreamMessages := registry.CounterVec("sent_stream_messages_total", []string{"protocol", "endpoint"})
receivedBytes := registry.CounterVec("received_bytes", []string{"protocol", "endpoint"})
sentBytes := registry.CounterVec("sent_bytes", []string{"protocol", "endpoint"})
@@ -100,6 +102,9 @@ func StreamServerMetrics(registry metrics.Registry) grpc.StreamServerInterceptor
solomon.Rated(panicsCount)
solomon.Rated(sentStreamMessages)
solomon.Rated(receivedStreamMessages)
+ solomon.Rated(receivedBytes)
+ solomon.Rated(sentBytes)
+ solomon.Rated(statusCount)
return func(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
deferFunc := func(startTime time.Time, opName string) {