-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 MicroProfile Health guide #1483
Conversation
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.
Nice work. I added a bunch of suggestion inline, mostly about grammar and readability.
You can include them in a batch then commit them.
Happy to discuss them if you disagree on some!
include::./attributes.adoc[] | ||
= {project-name} - MicroProfile Health | ||
|
||
This guide demonstrates how can your {project-name} application utilize MicroProfile |
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.
This guide demonstrates how can your {project-name} application utilize MicroProfile | |
This guide demonstrates how your {project-name} application can utilize the MicroProfile |
|
||
== Architecture | ||
|
||
In this guide, we build a simple REST application that exposes MP Health functionality at |
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.
Let's use MicroProfile in full in the guide.
In this guide, we build a simple REST application that exposes MP Health functionality at | |
In this guide, we build a simple REST application that exposes MicroProfile Health functionalities at |
== Architecture | ||
|
||
In this guide, we build a simple REST application that exposes MP Health functionality at | ||
`/health` endpoint according to the specification. It will also provide several other REST |
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.
`/health` endpoint according to the specification. It will also provide several other REST | |
the `/health` endpoint according to the specification. It will also provide several other REST |
|
||
== Running the health check | ||
|
||
Importing `smallrye-health` extension directly exposes a single REST endpoint at |
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.
Importing `smallrye-health` extension directly exposes a single REST endpoint at | |
Importing the `smallrye-health` extension directly exposes a single REST endpoint at |
== Running the health check | ||
|
||
Importing `smallrye-health` extension directly exposes a single REST endpoint at | ||
`/health` of your application that can be used to run the health check procedures: |
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.
`/health` of your application that can be used to run the health check procedures: | |
`/health` that can be used to run the health check procedures: |
== Negative health check procedure | ||
|
||
In this section we create another health check procedure which simulates connection to | ||
external service provider like database. For the simplicity reasons, we only determine |
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.
external service provider like database. For the simplicity reasons, we only determine | |
an external service provider such as a database. For simplicity reasons, we only determine |
see in the `checks` array the newly added `Database connection health check` which is | ||
down and the error message explaining why it failed. | ||
|
||
As we shouldn't leave this application with health check in DOWN state and because we |
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.
As we shouldn't leave this application with health check in DOWN state and because we | |
As we shouldn't leave this application with a health check in DOWN state and because we |
|
||
As we shouldn't leave this application with health check in DOWN state and because we | ||
are running {project-name} dev mode you can add `database.up=true` in | ||
`META-INF/microprofile-config.properties` and rerun the health check again -- |
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.
`META-INF/microprofile-config.properties` and rerun the health check again -- | |
`src/main/resources/application.properties` and rerun the health check again -- |
This might need a change to the quickstart itself if you included the configuration file.
|
||
== Conclusion | ||
|
||
MicroProfile Health provides a way how can your application distribute information |
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.
MicroProfile Health provides a way how can your application distribute information | |
MicroProfile Health provides a way for your application to distribute information |
== Conclusion | ||
|
||
MicroProfile Health provides a way how can your application distribute information | ||
about its healthness state to typically state whether or not it is able to function properly. |
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 would remove typically
to simplify:
about its healthness state to typically state whether or not it is able to function properly. | |
about its healthness state to state whether or not it is able to function properly. |
Merged, thanks @xstefank! |
quickstart: quarkusio/quarkus-quickstarts#97