Skip to content

Commit

Permalink
chore(metrics): extend hb_metrics to abstract prometheus metrics
Browse files Browse the repository at this point in the history
Create hb_metrics process that abstracts metrics subsystem implementation
and exposes the API for registering and interacting with metrics.
  • Loading branch information
oltarasenko committed Dec 5, 2024
1 parent 8649c32 commit e3f7df0
Show file tree
Hide file tree
Showing 4 changed files with 653 additions and 8 deletions.
48 changes: 48 additions & 0 deletions config/sys.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[
{hb, [
{metrics, [
#{
type => histogram,
name => "ao_cache_write_time",
description => "Histogram of write operation duration",
buckets => [5, 10, 100, 500, 1000]
},
#{
type => counter,
name => "ao_cache_read",
description => "Counts ao cache read operation"
},
#{
type => counter,
name => "ao_cache_write",
description => "Counts ao cache write operation"
},
#{
type => counter,
name => "ao_cache_list",
description => "Counts ao cache list operation"
},

#{
type => counter,
name => "ao_cache_resolve",
description => "Counts ao cache resolve operation"
},

#{
type => counter,
name => "ao_cache_type",
description => "Counts ao cache type operation"
},

#{
type => counter,
name => "ao_make_link",
description => "Counts ao_cache ao_make_link operation"
}



]}
]}
].
6 changes: 4 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@
]}.

{shell, [
{apps, [hb]}
{apps, [hb]},
{config, "./config/sys.config"}
]}.

{eunit, [
{apps, [hb]}
{apps, [hb]},
{config, "./config/sys.config"}
]}.

{eunit_opts, [verbose]}.
Expand Down
Loading

0 comments on commit e3f7df0

Please sign in to comment.