1

I have created my own gauge metrics and exposed them. Below is the snapshot showing my code. Now I cannot set description and base unit of metrics using this way.

        int rate = (int) ((finPoint - initPoint)/Constants.TIME_IN_MINS);
        AtomicInteger n = meterRegistry.gauge("timeout.rate", atomicInteger);
        n.set(rate);

Can anyone please point out that there is any way to add a description of metrics using the above meterRegistry object?

Ritesh Singh
  • 181
  • 2
  • 12

1 Answers1

1

registry.gauge is a shortcut for a few common use-case. If you want to set the description, you can use the Gauge Builder, see the docs.

Jonatan Ivanov
  • 4,895
  • 2
  • 15
  • 30