-
Notifications
You must be signed in to change notification settings - Fork 109
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
Prometheus stuff #301
Prometheus stuff #301
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.
This seems like an improvement overall, but I'd appreciate a bit of tidying.
We'll also need a follow-up to integrate into cloud.
use spacetimedb_lib::{Address, Hash, Identity}; | ||
|
||
#[macro_export] | ||
macro_rules! metrics_group { |
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 is nice.
But also, possibly more generally useful than deep down the core crate? There is also a prometheus-macros crate on crates.io, maybe there is some overlap?
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.
Oh wow, there definitely is. That's funny lol, we had almost the same idea. I think in the future I'll look at expanding it to something more general (unsure about pulling it out into its own crate that I then publish or something, wrt licensing) but the one on crates.io doesn't let you make fields public (??) or else I might consider switching. I'm happy with the strong typing with this implementation, as well (not just strings everywhere).
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 meant maybe a workspace crate, or in lib, or somewhere near the top of the core crate module hierarchy. Just so me and others can find it easily for instrumenting other stuff.
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.
Ok, moved it to a submodule of spacetimedb_core::util
101dd4e
to
efe869f
Compare
I just wanted to say that I've been running with this changes on dev for a week or so and observing some of the metrics (like the queue length) and it works without any issues. Thanks for great work Noa! Also it would be great to merge it before 0.7.1, cause it's very useful for observing the load on the database, especially the module calls contention. |
efe869f
to
80f6f16
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.
Great work!
Description of Changes
Sorry, still in a bit of a funk, but figured I may as well just push what I have.
API and ABI
If the API is breaking, please state below what will break