prom_ex
prom_ex copied to clipboard
[FEATURE] Add customisable duration unit for Ecto plugin
Is your feature request related to a problem? Please describe. The default time unit is milliseconds.
Describe the solution you would like to see
Allow to select different time units like in prometheus_ecto
:
https://hexdocs.pm/prometheus_ecto/Prometheus.EctoInstrumenter.html#module-configuration
How would you expect this feature to work A description of a possible API, behaviour, modules, etc.
Additional context Add any other context or screenshots about the feature request here.
Having read a bit more, I understand that you do not want to offer too much configuration, however I think time unit customisation is pretty essential (probably not even just for this plugin). For example, in our setup, all other metrics are defined in seconds
, and I imagine this might also be the case in some other teams. We can still keep the default value at milliseconds
and make the opt optional, so only those who actually need to customise it can do so.