-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add Badger expvar metrics to Prometheus metrics. #5094
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @manishrjain)
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @manishrjain)
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.
We've renamed the metrics in badger and PR #5216 updates badger in dgraph. The metric names will have to be updated once PR #5216 is merged.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @manishrjain, @martinmr, and @prashant-shahi)
The test now finds metric names that have a number in the name. e.g., badger_v2_disk_reads_total.
Fixes #4772 This adds the following badger metrics into /debug/prometheus_metrics: badger_v2_disk_reads_total badger_v2_disk_writes_total badger_v2_gets_total badger_v2_lsm_bloom_hits_total (per level) badger_v2_lsm_level_gets_total (per level) badger_v2_memtable_gets_total badger_v2_puts_total badger_v2_read_bytes badger_v2_written_bytes This is added via the Prometheus expvar collector. Update metrics_test.go for the seven initial Badger versions (excluding the LSM metrics). This adds to the exposed Prometheus metrics. These metrics were already accessible via /debug/vars. The LSM metrics don't show up immediately. They show up after there are hits/gets to the LSM tree. Changes * Add Badger metrics to Prometheus * Update metrics test to check for badger metrics. Co-authored-by: Ibrahim Jarif <[email protected]>
Fixes #4772 This adds the following badger metrics into /debug/prometheus_metrics: badger_v2_disk_reads_total badger_v2_disk_writes_total badger_v2_gets_total badger_v2_lsm_bloom_hits_total (per level) badger_v2_lsm_level_gets_total (per level) badger_v2_memtable_gets_total badger_v2_puts_total badger_v2_read_bytes badger_v2_written_bytes This is added via the Prometheus expvar collector. Update metrics_test.go for the seven initial Badger versions (excluding the LSM metrics). This adds to the exposed Prometheus metrics. These metrics were already accessible via /debug/vars. The LSM metrics don't show up immediately. They show up after there are hits/gets to the LSM tree. Changes * Add Badger metrics to Prometheus * Update metrics test to check for badger metrics. Co-authored-by: Ibrahim Jarif <[email protected]>
Fixes hypermodeinc#4772 This adds the following badger metrics into /debug/prometheus_metrics: badger_v2_disk_reads_total badger_v2_disk_writes_total badger_v2_gets_total badger_v2_lsm_bloom_hits_total (per level) badger_v2_lsm_level_gets_total (per level) badger_v2_memtable_gets_total badger_v2_puts_total badger_v2_read_bytes badger_v2_written_bytes This is added via the Prometheus expvar collector. Update metrics_test.go for the seven initial Badger versions (excluding the LSM metrics). This adds to the exposed Prometheus metrics. These metrics were already accessible via /debug/vars. The LSM metrics don't show up immediately. They show up after there are hits/gets to the LSM tree. Changes * Add Badger metrics to Prometheus * Update metrics test to check for badger metrics. Co-authored-by: Ibrahim Jarif <[email protected]>
What does this PR do?
This adds the following badger metrics into /debug/prometheus_metrics:
badger_v2_disk_reads_total
badger_v2_disk_writes_total
badger_v2_gets_total
badger_v2_lsm_bloom_hits_total
(per level)badger_v2_lsm_level_gets_total
(per level)badger_v2_memtable_gets_total
badger_v2_puts_total
badger_v2_read_bytes
badger_v2_written_bytes
Changes:
Motivation
For #4772.
Components affected by this PR
This adds to the exposed Prometheus metrics. These metrics were already accessible via /debug/vars.
Does this PR break backwards compatibility?
No.
Fixes
#4772
More
The LSM metrics don't show up immediately. They show up after there are hits/gets to the LSM tree.
This change is
Docs Preview: