-
Notifications
You must be signed in to change notification settings - Fork 59
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
chore: more efficient metrics usage #3298
base: master
Are you sure you want to change the base?
Conversation
* Bound the metrics-label-values in arbitrary queries. * The metrics-label-values for prepared statements are kept as they already represent a fixed set.
You can find the image built from this PR at
Built from 6787618 |
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 would appreciate some reviews from @waku-org/waku team as this is generating alerting noise for our metrics cluster.
if query.contains("contentTopic IN"): | ||
return ContentTopicQuery | ||
elif query.contains("SELECT version()"): | ||
return SelectVersionQuery | ||
elif query.contains("WITH min_timestamp"): | ||
return MessagesLookupQuery |
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.
Don't you have like a key-value map in Nim?
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.
Don't you have like a key-value map in Nim?
Yes. In this case, the query
variable has longer content and we are just filtering by a substring.
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.
Yeah, but can't you just use keys as prefixes and iterate over them?
Description
they already represent a fixed set.
Issue
closes #3282