This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
[prometheus] too many metrics #195
Comments
joel-u410
added a commit
to joel-u410/namadexer
that referenced
this issue
Apr 10, 2024
See Zondax#195 for more info.
Indeed I don't think it is the wanted behavior. I have looked at your PR and it looks ok to me. Thanks for submitting it. I will take a bit more time to re-familiar myself with the metrics. There is things we can improve there. |
This was referenced Apr 11, 2024
rllola
pushed a commit
that referenced
this issue
Apr 14, 2024
…as a separate histogram (#199) This helps reduce some more of the redundant metrics as described in #195 and #198. COMPATIBILITY NOTE: this also renames the `db_save_` metrics to use common prefixes `db_save_duration_`, `db_save_batch_size_`, etc. instead of putting the metric type at the end of the name.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've noticed a very large number of metrics published to
prometheus
. On digging into it, I see lots of duplicated/repeated lines such as this:The longer the
indexer
service runs, the more such lines accumulate. Essentially, a new metric gets created for every block processed, and they stay / accumulate for the entire duration of the service process. As time goes on, this grows and grows without bound.This is caused by code such as the following:
Because of the
save_block
label with the valueblock.header.height.value()
, prior metrics for e.g.DB_SAVE_BLOCK_DURATION
andDB_SAVE_BLOCK_COUNTER
are never overwritten, but instead, with every block processed, a new metric is created.Is this the desired behavior? Or can we remove the
save_block
label here so that e.g.DB_SAVE_BLOCK_COUNTER
would actually function as a single counter, counting up with each block rather than creating a new counter with value1
for every block?If you agree with this change, I'm happy to submit a PR. Does anyone rely on that
save_block
label?The text was updated successfully, but these errors were encountered: