doc(DisplayMetricsMonitor): comments on use of micrometer interfaces
package org.terasology.engine.monitoring;
import io.micrometer.core.instrument.Clock;
-import io.micrometer.core.instrument.logging.LoggingRegistryConfig;
import io.micrometer.core.instrument.step.StepMeterRegistry;
+import io.micrometer.core.instrument.step.StepRegistryConfig;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
public static final Duration captureDuration = Duration.ofSeconds(1);
public DisplayMetricsMonitor() {
- super(new LoggingRegistryConfig() {
+ // micrometer doesn't provide concrete implementations of these Config classes.
+ // We don't need to vary this configuration or load it from an external source,
+ // so we define it using an anonymous class here.
+ super(new StepRegistryConfig() {
+ @Override
+ public String prefix() {
+ return "display";
+ }
+
@Override
public String get(String key) {
return null;
@@ -30,7 +38,7 @@ public Duration step() {
@Override
protected void publish() {
-
+ // We don't need to push records anywhere. The view polls the current values; past steps are discarded.
}
@Override
