vitess icon indicating copy to clipboard operation
vitess copied to clipboard

Make -grpc_prometheus work when not using a grpc server

Open henryr opened this issue 10 months ago • 1 comments

--grpc_prometheus enables server and client gRPC metrics. But if we don't have a gRPC server, but call servenv.Run() (which we are doing in some internal tools to have the servenv utilities available but without a gRPC server) 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.

henryr avatar Apr 12 '24 11:04 henryr

Review Checklist

Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.

General

  • [ ] Ensure that the Pull Request has a descriptive title.
  • [ ] Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • [ ] Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • [ ] Apply the release notes (needs details) label if users need to know about this change.
  • [ ] New features should be documented.
  • [ ] There should be some code comments as to why things are implemented the way they are.
  • [ ] There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • [ ] Is this flag really necessary?
  • [ ] Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • [ ] Each item in Jobs should be named in order to mark it as required.
  • [ ] If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • [ ] Protobuf changes should be wire-compatible.
  • [ ] Changes to _vt tables and RPCs need to be backward compatible.
  • [ ] RPC changes should be compatible with vitess-operator
  • [ ] If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • [ ] vtctl command output order should be stable and awk-able.

vitess-bot[bot] avatar Apr 12 '24 11:04 vitess-bot[bot]

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

github-actions[bot] avatar May 19 '24 01:05 github-actions[bot]

This PR was closed because it has been stale for 7 days with no activity.

github-actions[bot] avatar May 26 '24 01:05 github-actions[bot]