Skip to content

Allow non grpc services to report health/service existance #4992

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

Open
ST-DDT opened this issue Oct 24, 2018 · 3 comments
Open

Allow non grpc services to report health/service existance #4992

ST-DDT opened this issue Oct 24, 2018 · 3 comments
Assignees
Milestone

Comments

@ST-DDT
Copy link
Contributor

ST-DDT commented Oct 24, 2018

What version of gRPC are you using?

0.15.0

Feature-Request

Not all applications are purely grpc based, so it would be nice if the HealthStatusManager could expose the health also to other beans. This is especially useful for most monitoring systems that still rely on plain http (html/text/json...).

It would be nice if a method like the following could be added:

  • + getAllStatuses() : Map<String, Status>

as an alternative the following would also be OK:

  • + getServices() : Set<String>
  • + getStatus(name : String) : Status

Usecases:

  • Spring Actuator HealthChecks
  • Spring Actuator Info to report service existence/status

Alternatives considered: Create my own beans and track the health status twice.

Might be related to #1848, #4356.

PS: If this feature gets accepted, I can create a PR for that.

@dapengzhang0
Copy link
Member

The API setStatus(String service, ServingStatus status) is protobuf-based, and it definitely make sense to replace the API with one that does not depend on proto-generated class at all.

For the API BindableService getHealthService(), yes it is grpc-based, but this is grpc library. The health servlce as in the design here "is a GRPC service itself".

We don't provide API getAllStatuses and getStatus(name) in HealthStatusManager. That will be health service implementer's job.

@ST-DDT
Copy link
Contributor Author

ST-DDT commented Oct 24, 2018

So you are saying, that if I want to use the existing health feature for something not exclusively grpc related, I have to write it myself entirely? Even if I just want to lookup the health of a grpc service?

@zhangkun83
Copy link
Contributor

Talked with @ejona86. It should be fine to expose the status via HealthStatusManager, while we may want to stop exposing protobuf types on the API first. We could define our own enum for the statuses.

@ejona86 ejona86 added this to the Next milestone Oct 30, 2018
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

No branches or pull requests

4 participants