-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PROPOSAL] Correctly label the orderbook orders metric (#2917)
# Description We need to properly adjust the orderbook `orders` metric. The reason is that we got a false alarm alert, because as it is now, everything is a `limit` order, so we got a period of time in which we got orders (real `limit` ones) and no trades (because those orders were out of market). This could be solved in many ways, as discussed with @MartinquaXD , one way could be to only report "market" orders. But after giving it a deep thought, I think this is the best way, because we don't lose any type of order, and we report all of them labelled correctly. # Changes - Since all the orders are `limit` orders, I changed the `OrderClass` of the `orders` metric to reflect real `limit` orders or `user` orders (order not outside the market price). This way we keep all the orders tracked. I meant this class to be exclusively of the metric system, as we don't intent to store `user` order (aka `market` order) in the domain. But it is handy to have it in the metrics. - Use `strum` to serialize properly the enums - Classify the metric's `OrderClass` accordingly to the quote price if present. ## How to test 1. Checking / adjusting the metrics in grafana in staging --------- Co-authored-by: Martin Beckmann <[email protected]>
- Loading branch information
1 parent
b8e6d79
commit 61240bc
Showing
5 changed files
with
293 additions
and
42 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.