-
Notifications
You must be signed in to change notification settings - Fork 579
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
Add health check and metrics to first guide #128
Add health check and metrics to first guide #128
Conversation
…on of endpoints to Main
…import-section error triggered by AsciiDoc tag and end comments
@@ -25,5 +25,10 @@ | |||
<suppress checks="FileLength" | |||
files="config/config/src/main/java/io/helidon/config/Config.java" | |||
lines="1"/> | |||
|
|||
<!-- Java comments with AsciiDoc tag:: and end:: in import section incorrectly flagged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can foresee the list of files growing.
How about using the comments to disable checkstyle.
//CHECKSTYLE:OFF
xyz
//CHECKSTYLE:ON
See http://checkstyle.sourceforge.net/config_filters.html#SuppressionCommentFilter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at that (very) briefly but did not try it. In my admittedly quick reading about it it seemed that using the suppression comment filter required more configuration and uses a module which I thought required a later version of check style
than the one we are using, but I could be wrong. Of course we could think about going to the later version if needed but to start with I wanted to minimize what I needed to do to work around this.
…oper extra breaks in imports; this adds an exception
…-first-guide Include Romain's reformatting of the pom
These changes add, to the Java code and the AsciiDoc, code and discussion for adding the health check (readiness and liveness, in K8s terms) to the example app.
The previous part of the guide should not have changed (with one exception: we now save a reference to the instantiated
GreetService
object so we can use it in creating the routing and also later in the health implementation). Having said that, the source code in the example.java
files now includes the health check code so the AsciiDocincludes
s for the initial part of the guide had to change slightly to avoid showing the health-related code at first. So it's possible that I inadvertently messed that up, so reviewers should help me make sure the first part is still correct.I added the readiness and liveness endpoints in the
Main
class, not theGreetingService
class (based on the recent slack discussion) and wrote a very quick review of K8s readiness and liveness.I've marked this PR as WIP temporarily because I want to do a more thorough review myself, but I also want others to take a look as they have time.