io.micrometer.core.instrument.noop.NoopGauge Java Examples
The following examples show how to use
io.micrometer.core.instrument.noop.NoopGauge.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompositeGauge.java From micrometer with Apache License 2.0 | 4 votes |
@Override Gauge newNoopMeter() { return new NoopGauge(getId()); }
Example #2
Source File: NoopMeterRegistry.java From dolphin-platform with Apache License 2.0 | 4 votes |
@Override protected <T> Gauge newGauge(final Meter.Id id, final T obj, final ToDoubleFunction<T> valueFunction) { return new NoopGauge(id); }
Example #3
Source File: NoopMeterRegistry.java From armeria with Apache License 2.0 | 4 votes |
@Override protected <T> Gauge newGauge(Id id, @Nullable T obj, ToDoubleFunction<T> f) { return new NoopGauge(id); }
Example #4
Source File: MeterRegistry.java From micrometer with Apache License 2.0 | 2 votes |
/** * Only used by {@link Gauge#builder(String, Object, ToDoubleFunction)}. * * @param id The identifier for this gauge. * @param obj State object used to compute a value. * @param valueFunction Function that is applied on the value for the number. * @param <T> The type of the state object from which the gauge value is extracted. * @return A new or existing gauge. */ <T> Gauge gauge(Meter.Id id, @Nullable T obj, ToDoubleFunction<T> valueFunction) { return registerMeterIfNecessary(Gauge.class, id, id2 -> newGauge(id2, obj, valueFunction), NoopGauge::new); }