sksamuel / cohort

Ktor/Vertx spring-actuator style library - healthchecks, logging, database
Apache License 2.0
123 stars 6 forks source link

health check fixes #45

Closed monosoul closed 7 months ago

monosoul commented 7 months ago
  1. Changes Kafka health checks to use interfaces instead of implementations: e960d7aec6ad087647d45d8fb9b632875691c2a2
  2. Makes it possible to register multiple health checks of the same type by providing different names: 0d0c4b3c2a3bca2c7d296c428123b1b13d258809 . This is useful when you have multiple consumers within the same app.
  3. fixes DatabaseConnectionHealthCheck so that it returns Unhealthy if connection is invalid: e4ec143ef1e4014ae096438dbef5ca7490818040
  4. introduces GenericMongoConnectionHealthCheck that can be used with both sync and async clients, also changes the dependency config there so that it doesn't bring sync client as a transitive dependency to projects using it: 86c566e021f127a2fce7d6b7fd2f89399bfde51e
monosoul commented 7 months ago

@sksamuel would it be okay if I update all healthchecks to have name as a constructor argument? I realized in some apps we have multiple datasources, so registering multiple DB healthchecks would also be handy.

sksamuel commented 7 months ago

Yep that works.

On Sat, Jan 20, 2024, 4:17 AM Andrei Nevedomskii @.***> wrote:

@sksamuel https://github.com/sksamuel would it be okay if I update all healthchecks to have name as a constructor argument? I realized in some apps we have multiple datasources, so registering multiple DB healthchecks would also be handy.

— Reply to this email directly, view it on GitHub https://github.com/sksamuel/cohort/pull/45#issuecomment-1902057335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGUTT2IYLWBVFSGF36LYPOKUPAVCNFSM6AAAAABB77LJK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGA2TOMZTGU . You are receiving this because you were mentioned.Message ID: @.***>

sksamuel commented 7 months ago

Do you want to do that in this PR or as a follow on ?

monosoul commented 7 months ago

@sksamuel did it all in this PR. I've also fixed DatabaseConnectionHealthCheck since it was previously ignoring isValid call result and made cohort-mongo module usable with both sync and async clients (I kept the original MongoConnectionHealthCheck there for backwards compatibility)

sksamuel commented 7 months ago

Niceeee

monosoul commented 7 months ago

@sksamuel any chance you could release it this week? :innocent:

sksamuel commented 7 months ago

2.3.1 is out :)

monosoul commented 6 months ago

Btw, @sksamuel you didn't create a release in GH. Not sure if that's a big problem, but I imagine might be confusing to people

sksamuel commented 6 months ago

Oops. I did now.