prom_ex icon indicating copy to clipboard operation
prom_ex copied to clipboard

[FEATURE] Add customisable duration unit for Ecto plugin

Open DaniruKun opened this issue 2 years ago • 1 comments

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.

DaniruKun avatar Apr 19 '22 14:04 DaniruKun

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.

DaniruKun avatar Apr 19 '22 15:04 DaniruKun