-
Notifications
You must be signed in to change notification settings - Fork 119
Rework metrics to use metrics crate #361
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
Conversation
937173f
to
484678c
Compare
484678c
to
6e131b8
Compare
6e131b8
to
2d829d6
Compare
f523fdb
to
411b9f6
Compare
411b9f6
to
1518045
Compare
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.
A couple of general questions:
Did we get rid of Gauges? There was a use of them previously and if I am not mistaken somewhere we have an issue that asks for a running total of memory in use, in addition the intent was that these could be used by things built on top of hyperlight such as hyperlight-wasm (we should maintain consistency in the way metrics are collected and emitted between hyperlight and crates built on top)
I may have commented on this in the code review but I dont see how a crate such as hyperlight-wasm would be able to use the metrics structs and macros?
0b50f7a
to
704a954
Compare
b5f1cf5
to
f4e48cc
Compare
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
…irectly Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
f4e48cc
to
1cc9f83
Compare
I totally changed the direction of this PR. We now simply use the macros directly where we want to emit metrics. I dont think we need any further abstractions @simongdavies |
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
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
758da63
to
047baf8
Compare
This simplifies metrics a lot by using the
metrics
crate. Themetrics
crate functions similar to thelog
crate in that libraries just callcounter!
,gauge!
orhistogram!
to record metrics, and the user of the library can decide where to send the metrics by installing an appropriate recorder/exporter. If no exporter is installed, the overhead to call the macros are minimal.NEW: got rid of the "nice" apis previously suggested, and now uses the metrics' crates macros directly. Hyperlight-wasm can easily do the same.