@Test public void gaugeOnNullValue() { Gauge gauge = registry.gauge("gauge", emptyList(), null, obj -> 1.0); assertEquals(gauge.value(), Double.NaN, 0); }
@Override public <T> Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f) { return new MicrometerGauge<T>(io.micrometer.core.instrument.Gauge.builder(name, obj, f).tags(toTags(tags)).register(registry)); }
MicrometerMetricsRegistry implements MetricsRegistry { @Override public <T> Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f) { return new MicrometerGauge<T>(io.micrometer.core.instrument.Gauge.builder(name, obj, f).tags(toTags(tags)).register(registry)); } }
MicrometerMetricsRegistry implements MetricsRegistry { @Override public <T> Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f) { return new MicrometerGauge<T>(io.micrometer.core.instrument.Gauge.builder(name, obj, f).tags(toTags(tags)).register(registry)); } MicrometerMetricsRegistry(MeterRegistry registry); }
MicrometerMetricsRegistry implements MetricsRegistry { @Override public <T> Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f) { return new MicrometerGauge<T>(io.micrometer.core.instrument.Gauge.builder(name, obj, f).tags(toTags(tags)).register(registry)); } MicrometerMetricsRegistry(MeterRegistry registry); @Override Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f); @Override Counter counter(String name, Collection<Tag> tags); @Override Timer timer(String name, Collection<Tag> tags); }
MicrometerMetricsRegistry implements MetricsRegistry { @Override public <T> Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f) { return new MicrometerGauge<T>(io.micrometer.core.instrument.Gauge.builder(name, obj, f).tags(toTags(tags)).register(registry)); } MicrometerMetricsRegistry(MeterRegistry registry); @Override Gauge gauge(String name, Collection<Tag> tags, T obj, ToDoubleFunction<T> f); @Override Counter counter(String name, Collection<Tag> tags); @Override Timer timer(String name, Collection<Tag> tags);  }