Skip to content

Commit

Permalink
Expose and document bucket helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Feb 13, 2025
1 parent ee5749c commit 6dc5dee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/prometheus_buckets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@

-export([new/0, new/1, position/2, default/0]).

-ifdef(TEST).
-export([exponential/3, linear/3]).
-endif.

-type bucket_bound() :: number() | infinity.
-type buckets() :: [bucket_bound(), ...].

?DOC("""
Histogram buckets configuration.
Setting the `buckets` key of a histogram to
- `default`: will use the default buckets
- `linear`: will use `Start`, `Step`, and `Count` to generate the buckets as in `linear/3`
- `exponential`: will use `Start`, `Factor`, and `Count` to generate the buckets as in `exponential/3`
You can also specify your own buckets if desired instead.
""").
-type config() ::
undefined
| default
Expand Down

0 comments on commit 6dc5dee

Please sign in to comment.