-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST VC metrics #13588
REST VC metrics #13588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it's worth, the current implementation for gRPC has two pairs of counter metrics tracking on the client side.
- unary requests (started_total, handled_total)
- stream requests (started_total, handled_total)
Then it has three histograms
- client handled (unary requests)
- client stream sent
- client stream received
All of these have three labels []string{"grpc_type", "grpc_service", "grpc_method"})
and sometimes a fourth label grpc_code
.
With all of that, I would suggest that we mirror that in the implementation here for http.
Counters:
- Total number of RPCs started on the client (labels = "type", "service", "method")
- Total number of RPCs completed by the client, regardless of success or failure. (labels = "type", "service", "method", "code")
Histograms
- Histogram of response latency (seconds) of the RPC until it is finished by the application. (labels = "type", "service", "method")
# Conflicts: # beacon-chain/node/node.go # beacon-chain/rpc/service.go # beacon-chain/rpc/service_test.go
var ( | ||
httpRequestLatency = promauto.NewHistogramVec( | ||
prometheus.HistogramOpts{ | ||
Name: "http_request_latency_seconds", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promhttp
measures seconds
# Conflicts: # beacon-chain/rpc/service.go # beacon-chain/rpc/service_test.go # validator/client/beacon-api/beacon_api_validator_client.go
# Conflicts: # beacon-chain/rpc/service.go
No description provided.