Skip to content
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

Merged
merged 11 commits into from
Nov 1, 2018
Merged

Add health check and metrics to first guide #128

merged 11 commits into from
Nov 1, 2018

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Oct 25, 2018

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 AsciiDoc includess 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 the GreetingService 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.

…import-section error triggered by AsciiDoc tag and end comments
@tjquinno tjquinno self-assigned this Oct 29, 2018
@tjquinno tjquinno changed the title WIP: Add health check to first guide Add health check to first guide Oct 29, 2018
@@ -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
Copy link
Contributor

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

Copy link
Member Author

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.

@tjquinno tjquinno changed the title Add health check to first guide Add health check and metrics to first guide Oct 31, 2018
@tjquinno tjquinno merged commit c3ee916 into helidon-io:master Nov 1, 2018
@tjquinno tjquinno deleted the add-health-check-to-first-guide branch November 1, 2018 18:08
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

Successfully merging this pull request may close these issues.

2 participants