Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ivansete-status
Copy link
Collaborator

@Ivansete-status Ivansete-status commented Feb 13, 2025

Description

  • Bound the metrics-label-values in arbitrary queries.
  • The metrics-label-values for prepared statements are kept as
    they already represent a fixed set.
  • Store error metrics labels simplification to avoid overwhelm prometheus
  • waku/waku_store_legacy/protocol_metrics.nim: change the metrics' names to separate store-v2 (legacy) metrics from store-v3

Issue

closes #3282

* Bound the metrics-label-values in arbitrary queries.
* The metrics-label-values for prepared statements are kept as
  they already represent a fixed set.
Copy link

github-actions bot commented Feb 13, 2025

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3298

Built from 3d125ea

Copy link
Contributor

@jakubgs jakubgs left a 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.

@jakubgs
Copy link
Contributor

jakubgs commented Feb 24, 2025

Any news on this? The metrics are still being dropped.

Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment.

return AnalyzeMessagesQuery
elif query.contains("SELECT EXISTS"):
return CheckVersionTableExistsQuery

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add else exception here... for stmnt not matching.

@Ivansete-status Ivansete-status marked this pull request as ready for review February 28, 2025 19:30
Comment on lines +30 to +33
const QueriesToMetricMap* = {
"contentTopic IN": ContentTopicQuery,
"SELECT version()": SelectVersionQuery,
"WITH min_timestamp": MessagesLookupQuery,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks much better, but what's the point of these consts if they are not used anywhere else? Seem pointless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: waku_store_errors_created metrics puts whole errors into labels
4 participants