-
Notifications
You must be signed in to change notification settings - Fork 18
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
Update metrics and pktparse #151
Conversation
I tested the metrics viewer at http://localhost:9001/metrics Looks like it broke something. Maybe theres a new setup step in the new version we are missing? |
Oh, I should mention that to reproduce that you will need to:
|
Good catch @rukai |
Note that ShotoverManager intentionally does not initialize the metrics webserver in the hopes of one day allowing better parallelization of tests.
I'm thinking we could change ShotoverManager::new() to take a closure that initalizes shotover and returns a JoinHandle. An alternative approach is to just always initialize the observability interface |
So I think we can just use the metrics-exporter-prometheus as our global recorder. Given that we definitely need to export JSON too, we could make this method public and then serialize to JSON ourselves. Any insight before I head down this path? I have confirmed that |
I would get the PR working without json and resolve merge conflicts, then lets wait to hear back from @benbromhead on what usecases we need to handle here. |
Having some trouble getting an async test working so I have had to use a blocking HTTP library for now, will update if I get it working. |
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 few bits of feedback, then we need to wait for @benbromhead to explain the history of json here
So we need the JSON exporter for Instaclustrs metrics collection agent (node-agent) which is pretty much an internal use case. Choices were made to match how we do it in other parts of our ecosystem -> #70 (comment) It's a bit odd as prometheus / open metrics used to support a json exposition format, but that's also deprecated. So for the moment we need to support the deprecated exposition format until our node-agent can support natively the open metrics format. |
Also @conorbros see #141 (comment) Some tips on easy async tests |
@benbromhead re async tests: The |
I was trying to understand the format of this json option. On this page https://github.com/instaclustr/cassandra-exporter I found this:
So seems like the json output is something non-standard instaclustr came up with? The output seems super basic.
I havent looked at our implementation much but if we have access to the metrics data it should be trivial to throw it in a HashMap and export to json via serde. Or even construct it manually ourselves if constructing a hashmap is a performance concern. |
cc @amrutha-shanbhag @zegelin @johndelcastillo -> We are trying to keep compat for internal Instaclustr metrics |
Is the question: Can we get rid of it? |
Ah of course. https://docs.rs/tokio/1.10.1/tokio/runtime/struct.Handle.html#method.try_current looks relevant
|
Yes and, if no, the format it expects is the old prometheus json format, or our own weird one? |
lets just get rid of it and we will re-do the metrics collector it served its purpose for pubnub but we have no active use case anyway |
@johndelcastillo Just so you know we can support it, I've almost finished the changes required for that. However it will require merging some changes into upstream metrics library so if we are able to remove it that would be best. |
Yeah its ok, lets not create a maintenance issue in the future |
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.
The
timing
macro in the latest version ofmetrics
has been replaced withhistogram
.pktparse
needed the feature flag to be set toserde
instead ofderive
.