You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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 <martin.beckmann@protonmail.com>
0 commit comments