Skip to content
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

Don't crash when gRPC metrics are enabled without a server #295

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

henryr
Copy link

@henryr henryr commented Apr 12, 2024

--grpc_prometheus enables server and client gRPC metrics. But if we don't have a gRPC server, but call servenv.Run() like we're doing here, the process will crash because of some uninitialized server state. Fix by moving the prom enable logic after the check to see if we actually have a server.

This is still a bug upstream, so I'll send the fix there as well.

Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
@henryr henryr requested a review from demmer April 12, 2024 10:50
@henryr henryr merged commit 770f7b4 into vtgateproxy Apr 12, 2024
152 of 241 checks passed
@henryr henryr deleted the hnr-fix-grpc-metrics branch April 12, 2024 11:15
dedelala pushed a commit that referenced this pull request May 30, 2024
* Make -grpc_prometheus work when not using a grpc server

Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Esme Lamb <dlamb@slack-corp.com>
dedelala pushed a commit that referenced this pull request Jul 30, 2024
* Make -grpc_prometheus work when not using a grpc server

Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Esme Lamb <dlamb@slack-corp.com>
dedelala pushed a commit that referenced this pull request Sep 9, 2024
* Make -grpc_prometheus work when not using a grpc server

Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Esme Lamb <dlamb@slack-corp.com>
dedelala pushed a commit that referenced this pull request Nov 12, 2024
* Make -grpc_prometheus work when not using a grpc server

Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
Signed-off-by: Esme Lamb <dlamb@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants