-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat(maker): Monitor and expose status of services connected #1180
Conversation
943dfaa
to
fc43972
Compare
fc43972
to
d6cd1e0
Compare
I'm not sure whether we actually need the orderbook status (we don't seem to rely on the websocket stream at all so far? 🤔), and bitmex status can be added when we actually start hedging (it was not mentioned in the ticket, but I think it's an essential service for the maker to be monitored). |
d6cd1e0
to
3b890ff
Compare
@@ -52,6 +56,7 @@ pub fn router( | |||
.route("/api/pay-invoice/:invoice", post(pay_invoice)) | |||
.route("/api/sync-on-chain", post(sync_on_chain)) | |||
.route("/metrics", get(get_metrics)) | |||
.route("/health", get(get_health)) |
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.
For whom is this new endpoint?
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.
it's useful in development, testing, and manual checking if we want to quickly see the state.
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.
There are a few comments/todos in the code and I believe the usage of the metrics is not correct.
Let me know if my comment is not clear.
3b890ff
to
b9b6fec
Compare
Monitor the following services: - coordinator - orderbook (as we don't subscribe to orderbook feed yet, so it's hardcoded to "online") - bitmex pricefeed in order to derive health status of the maker. Health status is exposed via the HTTP API as well as reported as dedicated prometheus metrics.
b9b6fec
to
43db279
Compare
I believe I fixed the issue. |
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.
LGTM
Thanks for addressing. |
Monitor the following services:
- coordinator
- orderbook (we don't subscribe to orderbook feed yet)
in order to derive health status of the maker.
Health status is exposed via the HTTP API as well as reported as
dedicated prometheus metrics.
the TODO listed above will be wired only when bitmex and orderbook streams will be integrated into maker, and as such are not a dependency of this PR - we can wire them in the corresponding PRs or in a follow-up.