feat(server): add Prometheus metrics infrastructure and gRPC/HTTP request metrics#920
Merged
TaylorMutch merged 2 commits intoNVIDIA:mainfrom Apr 23, 2026
Merged
Conversation
TaylorMutch
reviewed
Apr 22, 2026
c7500f3 to
b3cd83a
Compare
Collaborator
|
Failing CI is unrelated to your branch |
b3cd83a to
ec34b2b
Compare
…uest metrics Add metrics exposition via a dedicated server port (--metrics-port, default disabled) following the same optional-listener pattern as the health port. The metrics crate facade records counters and histograms in the MultiplexedService hot path, and a PrometheusHandle renders them at GET /metrics on the dedicated port. Metrics added: - openshell_server_grpc_requests_total (counter: method, code) - openshell_server_grpc_request_duration_seconds (histogram: method, code) - openshell_server_http_requests_total (counter: path, status) - openshell_server_http_request_duration_seconds (histogram: path, status)
Expose the Prometheus metrics endpoint in the helm chart by adding service.metricsPort (default 9090) to values, the --metrics-port arg and container port to the statefulset, and a metrics service port. Set metricsPort to 0 to disable.
ec34b2b to
d7a539c
Compare
TaylorMutch
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Prometheus metrics support to the openshell-server with a dedicated
/metricsendpoint on a configurable port, and instrument gRPC and HTTP request handlers with request count and duration histogram metrics.Related Issue
Starts work on #909
Changes
metricsandmetrics-exporter-prometheusworkspace dependenciesmetrics_bind_addressconfig field and--metrics-port/OPENSHELL_METRICS_PORTCLI flag/metricsPrometheus scrape endpointopenshell_grpc_requests_total,openshell_grpc_request_duration_seconds,openshell_http_requests_total, andopenshell_http_request_duration_secondsmetrics--port,--health-port, and--metrics-portTesting
mise run pre-commitpassesgrpc_method_from_path,grpc_status_from_response, andnormalize_http_pathChecklist