...
Instead of the interfeces set above, we could bring only a minimal metric management interface.
Code Block | ||
---|---|---|
| ||
package org.apache.ignite; |
...
public interface IgniteMetrics extends Iterable<ReadOnlyMetricRegistry> { |
...
LongConsumer longMetric(String registryName, String metricName, @Nullable String description); |
...
DoubleConsumer doubleMetric(String registryName, String metricName, @Nullable String description); |
...
IntConsumer booleanMetric(String registryName, String metricName, @Nullable String description); |
...
void longMetric(String registryName, String metricName, LongSupplier supplier, @Nullable String description); |
...
void doubleMetric(String registryName, String metricName, DoubleSupplier supplier, @Nullable String description); |
...
void intMetric(String registryName, String metricName, BooleanSupplier supplier, @Nullable String description); |
...
void removeCustomMetric(String registryName, String metricName); |
...
void removeCustomRegistry(String registryName); |
...
@Nullable ReadOnlyMetricRegistry findRegistry(String registryName); |
...
} |
Expand | ||
---|---|---|
| ||
/** */ // Registers metric "custom.service.svc.filteredInvocation" ignite.metrics().customRegistry(regName(ctx.name())).gauge("filteredInvocation", metricValue::get, "Counter of speceific service invocation."); // Registers metric "custom.service.svc.loaded" // Registers metric "custom.service.svc.remote.classId" |
...