HealthCheck endpoint behavior on TomEE

93 views
Skip to first unread message

Adam Wisniewski

unread,
Sep 30, 2019, 9:34:09 PM9/30/19
to Eclipse MicroProfile
Hi,

I have a basic health check set up using TomEE. My HealthCheck implementation is annotated with @Health and @ApplicationScoped, and my jaxrs Application implementation has an @ApplicationPath annotation set. What is the expected url regarding the /health endpoint? My understanding is that the endpoint should be scoped to the context root for the application, ignoring whatever is set for @ApplicationPath. However, on TomEE I notice the health endpoint is appended to the application path. For example, if I have @ApplicationPath(“groups”), the health check url is <host>:<port>/groups/health, not <host>:<port>/health. With other runtimes, the health check url does not include the application path (i.e. “groups”). Is this just a difference in implementation or should this behavior be consistent? 

Thanks! 

Antoine Sabot-Durand

unread,
Oct 1, 2019, 8:03:00 AM10/1/19
to Eclipse MicroProfile
Hi,

MP Health doesn't spec doesn't say anything regarding @ApplicationPath, therefore the expected behavior is to have /<contextroot>/health as endpoint. Some implementation provide specific configuration to change these endpoints.

Emily Jiang

unread,
Oct 1, 2019, 8:35:29 AM10/1/19
to Eclipse MicroProfile

I checked MicroProfile Health Spec and TCK. The spec mentions: Contextual references of health check procedures are invoked by runtime when the outermost protocol entry point (i.e. http://HOST:PORT/health) receives an inbound request.



"For any test runs, the TCK will append /health, so that a fully qualified URL to your health impoementation looks like http://<HOST:<PORT>/health"

See the detailed discussion on this issue, when I asked for the end point to be exposed under application context. Different impls can provide over and above than what is required, which is host:port/health/*.

Thanks
Emily

Jonathan Gallimore

unread,
Oct 1, 2019, 8:51:57 AM10/1/19
to MicroProfile
Hi Adam

Could you report this on the TomEE mailing list? I'd be happy to take a look.

Cheers

Jon

--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/088efc10-847d-4032-b728-645d4c68f6bc%40googlegroups.com.


--
Message has been deleted

Adam Wisniewski

unread,
Oct 1, 2019, 10:26:05 AM10/1/19
to Eclipse MicroProfile
Hi Jon - will do.  Is that just us...@tomee.apache.org?



On Tuesday, October 1, 2019 at 8:51:57 AM UTC-4, Jonathan Gallimore wrote:
Hi Adam

Could you report this on the TomEE mailing list? I'd be happy to take a look.

Cheers

Jon

On Tue, Oct 1, 2019 at 2:34 AM Adam Wisniewski <adam.wis...@gmail.com> wrote:
Hi,

I have a basic health check set up using TomEE. My HealthCheck implementation is annotated with @Health and @ApplicationScoped, and my jaxrs Application implementation has an @ApplicationPath annotation set. What is the expected url regarding the /health endpoint? My understanding is that the endpoint should be scoped to the context root for the application, ignoring whatever is set for @ApplicationPath. However, on TomEE I notice the health endpoint is appended to the application path. For example, if I have @ApplicationPath(“groups”), the health check url is <host>:<port>/groups/health, not <host>:<port>/health. With other runtimes, the health check url does not include the application path (i.e. “groups”). Is this just a difference in implementation or should this behavior be consistent? 

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.

Jonathan Gallimore

unread,
Oct 1, 2019, 10:34:10 AM10/1/19
to MicroProfile
Yes - that should do the trick - thank you!

To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/b63675b7-7bbf-4eed-952f-c3f5a7b9f147%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages