io.micrometer.core.instrument.noop.NoopMeter Java Examples
The following examples show how to use
io.micrometer.core.instrument.noop.NoopMeter.
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: MicrometerChannelMetricsRecorder.java From reactor-netty with Apache License 2.0 | 5 votes |
@Nullable protected static <M extends Meter> M filter(M meter) { if (meter instanceof NoopMeter) { return null; } else { return meter; } }
Example #2
Source File: NoopMeterRegistry.java From armeria with Apache License 2.0 | 4 votes |
@Override protected Meter newMeter(Id id, Type type, Iterable<Measurement> measurements) { return new NoopMeter(id); }
Example #3
Source File: MeterRegistry.java From micrometer with Apache License 2.0 | 2 votes |
/** * Register a custom meter type. * * @param id Id of the meter being registered. * @param type Meter type, which may be used by naming conventions to normalize the name. * @param measurements A sequence of measurements describing how to sample the meter. * @return The meter. */ Meter register(Meter.Id id, Meter.Type type, Iterable<Measurement> measurements) { return registerMeterIfNecessary(Meter.class, id, id2 -> newMeter(id2, type, measurements), NoopMeter::new); }