-
Notifications
You must be signed in to change notification settings - Fork 39
Expose MLS method invocation statistics #730
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
Conversation
WalkthroughThe changes integrate Prometheus-based gRPC client metrics collection into the MLS validation service and related server setup. The constructor for the MLS validation service now accepts a gRPC client metrics parameter, which is used to add monitoring interceptors to gRPC client connections. The server initialization logic creates and registers a new Prometheus gRPC client metrics collector when metrics are enabled, and this collector is passed to the MLS validation service and API server functions. No other logic or control flow is modified. Changes
Sequence Diagram(s)sequenceDiagram
participant Prometheus
participant Server
participant MetricsCollector
participant MLSValidationService
participant gRPCClient
Server->>MetricsCollector: Create grpcprom.ClientMetrics
MetricsCollector->>Prometheus: Register collector (if enabled)
Server->>MLSValidationService: Initialize with clientMetrics
MLSValidationService->>gRPCClient: Setup with Prometheus interceptors
gRPCClient-->>Prometheus: Report client metrics during RPC calls
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🔇 Additional comments (7)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
neekolas
left a comment
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.
I’m a little worried that namespacing this as “mls” instead of something like “validation service” is going to get confusing. We do a lot of things around “mls” and the term might be overloaded.
f24a6a3 to
00eb28c
Compare
|
@neekolas I've redone this with just using the vanilla client GRPC interceptor. Its much better this way |
|
Happy to help. Does look much tidier this way |
Add Prometheus metrics collection to MLS validation service client and server gRPC calls to expose method invocation statistics
Implements Prometheus metrics collection for gRPC client operations in two key areas:
grpcprom.ClientMetricsinto the MLS validation service clientNewReplicationServerandstartAPIServerfunctions📍Where to Start
Start with the
NewMlsValidationServicefunction in service.go which shows how the Prometheus metrics interceptors are integrated into the gRPC client connection.Macroscope summarized 00eb28c.
Summary by CodeRabbit
New Features
Chores