immudb icon indicating copy to clipboard operation
immudb copied to clipboard

do not rely on prometheus in embedded module

Open byo opened this issue 3 years ago • 0 comments

Currently the embedded package exposes some metrics directly using prometheus. We should remove this dependency leaving prometheus metrics only inside pkg/server package and introducing abstract interfaces instead.

Notes about btree stats added in https://github.com/codenotary/immudb/pull/1106:

  • We should label them with db name instead of path (should come naturally when introducing abstractions)
  • We should avoid frequent WithLabel calls - better to calculate final metrics once (should also come naturally)
  • We should not update cache size in nodeAt() call (see https://github.com/codenotary/immudb/pull/1106#discussion_r793943312) - better to update only once the cache size can change (after putting things onto the cache)
  • We should add overall btree size stats (what's the total number of entries stored in btree)

byo avatar Jan 04 '22 12:01 byo