-
Hello, I'm trying to create extension containing some custom health checks. One of the use cases is to provide health checks for all http dependencies. So I thought I could just map rest client configuration:
and for each url (after some clean up) I could create HealthCheck instance. I did some testing and obviously the following code won't work:
So how can I register them in the SmallRyeHealthReporter? There's no way I could do it manually (too many urls and repos). Additionally how should the HealthBuildItem creation look like? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @b0ro, For this, we have a dedicated API in SR Health - https://smallrye.io/docs/smallrye-health/3.0.1/health-registry.html. HealthBuildItem can also be used. Many examples, just search for the usages of its constructors, e.g. https://github.com/quarkusio/quarkus/blob/main/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/deployment/client/RedisClientProcessor.java#L287-L291. |
Beta Was this translation helpful? Give feedback.
Hi @b0ro,
For this, we have a dedicated API in SR Health - https://smallrye.io/docs/smallrye-health/3.0.1/health-registry.html.
HealthBuildItem can also be used. Many examples, just search for the usages of its constructors, e.g. https://github.com/quarkusio/quarkus/blob/main/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/deployment/client/RedisClientProcessor.java#L287-L291.