parent
d79fb60398
commit
1793cee00f
|
|
@ -48,6 +48,7 @@ dependencies {
|
||||||
optional("io.dropwizard.metrics:metrics-jmx")
|
optional("io.dropwizard.metrics:metrics-jmx")
|
||||||
optional("io.lettuce:lettuce-core")
|
optional("io.lettuce:lettuce-core")
|
||||||
optional("io.micrometer:micrometer-core")
|
optional("io.micrometer:micrometer-core")
|
||||||
|
optional("io.micrometer:micrometer-binders")
|
||||||
optional("io.micrometer:micrometer-registry-appoptics")
|
optional("io.micrometer:micrometer-registry-appoptics")
|
||||||
optional("io.micrometer:micrometer-registry-atlas") {
|
optional("io.micrometer:micrometer-registry-atlas") {
|
||||||
exclude group: "javax.inject", module: "javax.inject"
|
exclude group: "javax.inject", module: "javax.inject"
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.ClassLoaderMetrics;
|
||||||
|
import io.micrometer.binder.jvm.JvmGcMetrics;
|
||||||
|
import io.micrometer.binder.jvm.JvmHeapPressureMetrics;
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
|
import io.micrometer.binder.jvm.JvmThreadMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmHeapPressureMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
|
import io.micrometer.binder.kafka.KafkaClientMetrics;
|
||||||
|
import io.micrometer.binder.kafka.KafkaStreamsMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.kafka.KafkaClientMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.kafka.KafkaStreamsMetrics;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
|
import io.micrometer.binder.logging.Log4j2Metrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.logging.Log4j2Metrics;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.spi.LoggerContext;
|
import org.apache.logging.log4j.spi.LoggerContext;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import ch.qos.logback.classic.LoggerContext;
|
import ch.qos.logback.classic.LoggerContext;
|
||||||
|
import io.micrometer.binder.logging.LogbackMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
|
|
||||||
import org.slf4j.ILoggerFactory;
|
import org.slf4j.ILoggerFactory;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.micrometer.binder.system.FileDescriptorMetrics;
|
||||||
|
import io.micrometer.binder.system.ProcessorMetrics;
|
||||||
|
import io.micrometer.binder.system.UptimeMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tags;
|
import io.micrometer.core.instrument.Tags;
|
||||||
import io.micrometer.core.instrument.binder.system.FileDescriptorMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.system.ProcessorMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.system.UptimeMetrics;
|
|
||||||
|
|
||||||
import org.springframework.boot.actuate.metrics.system.DiskSpaceMetricsBinder;
|
import org.springframework.boot.actuate.metrics.system.DiskSpaceMetricsBinder;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -22,7 +22,6 @@ import java.util.concurrent.TimeUnit;
|
||||||
import info.ganglia.gmetric4j.gmetric.GMetric;
|
import info.ganglia.gmetric4j.gmetric.GMetric;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Ganglia
|
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Ganglia
|
||||||
|
|
@ -97,17 +96,6 @@ public class GangliaProperties {
|
||||||
this.step = step;
|
this.step = step;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@DeprecatedConfigurationProperty(reason = "No longer used by Micrometer.")
|
|
||||||
public TimeUnit getRateUnits() {
|
|
||||||
return this.rateUnits;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void setRateUnits(TimeUnit rateUnits) {
|
|
||||||
this.rateUnits = rateUnits;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimeUnit getDurationUnits() {
|
public TimeUnit getDurationUnits() {
|
||||||
return this.durationUnits;
|
return this.durationUnits;
|
||||||
}
|
}
|
||||||
|
|
@ -116,17 +104,6 @@ public class GangliaProperties {
|
||||||
this.durationUnits = durationUnits;
|
this.durationUnits = durationUnits;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@DeprecatedConfigurationProperty(reason = "No longer used by Micrometer.")
|
|
||||||
public String getProtocolVersion() {
|
|
||||||
return this.protocolVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void setProtocolVersion(String protocolVersion) {
|
|
||||||
this.protocolVersion = protocolVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GMetric.UDPAddressingMode getAddressingMode() {
|
public GMetric.UDPAddressingMode getAddressingMode() {
|
||||||
return this.addressingMode;
|
return this.addressingMode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -56,23 +56,11 @@ class GangliaPropertiesConfigAdapter extends PropertiesConfigAdapter<GangliaProp
|
||||||
return get(GangliaProperties::getStep, GangliaConfig.super::step);
|
return get(GangliaProperties::getStep, GangliaConfig.super::step);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public TimeUnit rateUnits() {
|
|
||||||
return get(GangliaProperties::getRateUnits, GangliaConfig.super::rateUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TimeUnit durationUnits() {
|
public TimeUnit durationUnits() {
|
||||||
return get(GangliaProperties::getDurationUnits, GangliaConfig.super::durationUnits);
|
return get(GangliaProperties::getDurationUnits, GangliaConfig.super::durationUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public String protocolVersion() {
|
|
||||||
return get(GangliaProperties::getProtocolVersion, GangliaConfig.super::protocolVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GMetric.UDPAddressingMode addressingMode() {
|
public GMetric.UDPAddressingMode addressingMode() {
|
||||||
return get(GangliaProperties::getAddressingMode, GangliaConfig.super::addressingMode);
|
return get(GangliaProperties::getAddressingMode, GangliaConfig.super::addressingMode);
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics.mongo;
|
package org.springframework.boot.actuate.autoconfigure.metrics.mongo;
|
||||||
|
|
||||||
import com.mongodb.MongoClientSettings;
|
import com.mongodb.MongoClientSettings;
|
||||||
|
import io.micrometer.binder.mongodb.DefaultMongoCommandTagsProvider;
|
||||||
|
import io.micrometer.binder.mongodb.DefaultMongoConnectionPoolTagsProvider;
|
||||||
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
|
||||||
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
|
||||||
|
import io.micrometer.binder.mongodb.MongoMetricsCommandListener;
|
||||||
|
import io.micrometer.binder.mongodb.MongoMetricsConnectionPoolListener;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.DefaultMongoCommandTagsProvider;
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.DefaultMongoConnectionPoolTagsProvider;
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoMetricsCommandListener;
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoMetricsConnectionPoolListener;
|
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ import java.util.Map;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.ExecutorServiceMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics.web.jetty;
|
package org.springframework.boot.actuate.autoconfigure.metrics.web.jetty;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jetty.JettyConnectionMetrics;
|
||||||
|
import io.micrometer.binder.jetty.JettyServerThreadPoolMetrics;
|
||||||
|
import io.micrometer.binder.jetty.JettySslHandshakeMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettyConnectionMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettyServerThreadPoolMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettySslHandshakeMetrics;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics.web.tomcat;
|
package org.springframework.boot.actuate.autoconfigure.metrics.web.tomcat;
|
||||||
|
|
||||||
|
import io.micrometer.binder.tomcat.TomcatMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.tomcat.TomcatMetrics;
|
|
||||||
import org.apache.catalina.Manager;
|
import org.apache.catalina.Manager;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
|
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
import io.micrometer.core.instrument.Statistic;
|
import io.micrometer.core.instrument.Statistic;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
|
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
import io.micrometer.core.instrument.Clock;
|
import io.micrometer.core.instrument.Clock;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
||||||
import io.prometheus.client.CollectorRegistry;
|
import io.prometheus.client.CollectorRegistry;
|
||||||
import io.prometheus.client.exporter.common.TextFormat;
|
import io.prometheus.client.exporter.common.TextFormat;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics;
|
import io.micrometer.binder.jvm.ClassLoaderMetrics;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics;
|
import io.micrometer.binder.jvm.JvmGcMetrics;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmHeapPressureMetrics;
|
import io.micrometer.binder.jvm.JvmHeapPressureMetrics;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics;
|
import io.micrometer.binder.jvm.JvmThreadMetrics;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.logging.Log4j2Metrics;
|
import io.micrometer.binder.logging.Log4j2Metrics;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.logging.Log4j2Metrics;
|
import io.micrometer.binder.logging.Log4j2Metrics;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.slf4j.SLF4JLoggerContext;
|
import org.apache.logging.slf4j.SLF4JLoggerContext;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
|
import io.micrometer.binder.logging.LogbackMetrics;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics;
|
package org.springframework.boot.actuate.autoconfigure.metrics;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
|
import io.micrometer.binder.logging.LogbackMetrics;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -20,10 +20,10 @@ import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.system.FileDescriptorMetrics;
|
||||||
|
import io.micrometer.binder.system.ProcessorMetrics;
|
||||||
|
import io.micrometer.binder.system.UptimeMetrics;
|
||||||
import io.micrometer.core.instrument.Tags;
|
import io.micrometer.core.instrument.Tags;
|
||||||
import io.micrometer.core.instrument.binder.system.FileDescriptorMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.system.ProcessorMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.system.UptimeMetrics;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -29,15 +29,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
class GangliaPropertiesTests {
|
class GangliaPropertiesTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
void defaultValuesAreConsistent() {
|
void defaultValuesAreConsistent() {
|
||||||
GangliaProperties properties = new GangliaProperties();
|
GangliaProperties properties = new GangliaProperties();
|
||||||
GangliaConfig config = GangliaConfig.DEFAULT;
|
GangliaConfig config = GangliaConfig.DEFAULT;
|
||||||
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
|
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
|
||||||
assertThat(properties.getStep()).isEqualTo(config.step());
|
assertThat(properties.getStep()).isEqualTo(config.step());
|
||||||
assertThat(properties.getRateUnits()).isEqualTo(config.rateUnits());
|
|
||||||
assertThat(properties.getDurationUnits()).isEqualTo(config.durationUnits());
|
assertThat(properties.getDurationUnits()).isEqualTo(config.durationUnits());
|
||||||
assertThat(properties.getProtocolVersion()).isEqualTo(config.protocolVersion());
|
|
||||||
assertThat(properties.getAddressingMode()).isEqualTo(config.addressingMode());
|
assertThat(properties.getAddressingMode()).isEqualTo(config.addressingMode());
|
||||||
assertThat(properties.getTimeToLive()).isEqualTo(config.ttl());
|
assertThat(properties.getTimeToLive()).isEqualTo(config.ttl());
|
||||||
assertThat(properties.getHost()).isEqualTo(config.host());
|
assertThat(properties.getHost()).isEqualTo(config.host());
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
import io.micrometer.core.instrument.Clock;
|
import io.micrometer.core.instrument.Clock;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.humio.HumioConfig;
|
import io.micrometer.humio.HumioConfig;
|
||||||
import io.micrometer.humio.HumioMeterRegistry;
|
import io.micrometer.humio.HumioMeterRegistry;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -23,12 +23,12 @@ import com.mongodb.client.MongoClient;
|
||||||
import com.mongodb.client.internal.MongoClientImpl;
|
import com.mongodb.client.internal.MongoClientImpl;
|
||||||
import com.mongodb.connection.ConnectionPoolSettings;
|
import com.mongodb.connection.ConnectionPoolSettings;
|
||||||
import com.mongodb.event.ConnectionPoolListener;
|
import com.mongodb.event.ConnectionPoolListener;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.DefaultMongoCommandTagsProvider;
|
import io.micrometer.binder.mongodb.DefaultMongoCommandTagsProvider;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.DefaultMongoConnectionPoolTagsProvider;
|
import io.micrometer.binder.mongodb.DefaultMongoConnectionPoolTagsProvider;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoMetricsCommandListener;
|
import io.micrometer.binder.mongodb.MongoMetricsCommandListener;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoMetricsConnectionPoolListener;
|
import io.micrometer.binder.mongodb.MongoMetricsConnectionPoolListener;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,11 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CyclicBarrier;
|
import java.util.concurrent.CyclicBarrier;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
|
import io.micrometer.binder.logging.LogbackMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.MockClock;
|
import io.micrometer.core.instrument.MockClock;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
|
|
||||||
import io.micrometer.core.instrument.simple.SimpleConfig;
|
import io.micrometer.core.instrument.simple.SimpleConfig;
|
||||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||||
import jakarta.servlet.DispatcherType;
|
import jakarta.servlet.DispatcherType;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.metrics.web.tomcat;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
import io.micrometer.binder.tomcat.TomcatMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.binder.tomcat.TomcatMetrics;
|
|
||||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||||
import org.apache.tomcat.util.modeler.Registry;
|
import org.apache.tomcat.util.modeler.Registry;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ dependencies {
|
||||||
optional("com.zaxxer:HikariCP")
|
optional("com.zaxxer:HikariCP")
|
||||||
optional("io.lettuce:lettuce-core")
|
optional("io.lettuce:lettuce-core")
|
||||||
optional("io.micrometer:micrometer-core")
|
optional("io.micrometer:micrometer-core")
|
||||||
|
optional("io.micrometer:micrometer-binders")
|
||||||
optional("io.micrometer:micrometer-registry-prometheus")
|
optional("io.micrometer:micrometer-registry-prometheus")
|
||||||
optional("io.prometheus:simpleclient_pushgateway") {
|
optional("io.prometheus:simpleclient_pushgateway") {
|
||||||
exclude(group: "javax.xml.bind", module: "jaxb-api")
|
exclude(group: "javax.xml.bind", module: "jaxb-api")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.metrics.cache;
|
package org.springframework.boot.actuate.metrics.cache;
|
||||||
|
|
||||||
|
import io.micrometer.binder.cache.CaffeineCacheMetrics;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.CaffeineCacheMetrics;
|
|
||||||
|
|
||||||
import org.springframework.cache.caffeine.CaffeineCache;
|
import org.springframework.cache.caffeine.CaffeineCache;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -19,9 +19,9 @@ package org.springframework.boot.actuate.metrics.cache;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import com.hazelcast.spring.cache.HazelcastCache;
|
import com.hazelcast.spring.cache.HazelcastCache;
|
||||||
|
import io.micrometer.binder.cache.HazelcastCacheMetrics;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.HazelcastCacheMetrics;
|
|
||||||
|
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.metrics.cache;
|
package org.springframework.boot.actuate.metrics.cache;
|
||||||
|
|
||||||
|
import io.micrometer.binder.cache.JCacheMetrics;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.JCacheMetrics;
|
|
||||||
|
|
||||||
import org.springframework.cache.jcache.JCacheCache;
|
import org.springframework.cache.jcache.JCacheCache;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -19,10 +19,10 @@ package org.springframework.boot.actuate.metrics.system;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.micrometer.binder.system.DiskSpaceMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.system.DiskSpaceMetrics;
|
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.actuate.metrics.web.jetty;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jetty.JettyConnectionMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettyConnectionMetrics;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.actuate.metrics.web.jetty;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jetty.JettyServerThreadPoolMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettyServerThreadPoolMetrics;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.util.thread.ThreadPool;
|
import org.eclipse.jetty.util.thread.ThreadPool;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.actuate.metrics.web.jetty;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.jetty.JettySslHandshakeMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.jetty.JettySslHandshakeMetrics;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,8 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
|
||||||
Object handler = getHandler(request);
|
Object handler = getHandler(request);
|
||||||
Set<Timed> annotations = getTimedAnnotations(handler);
|
Set<Timed> annotations = getTimedAnnotations(handler);
|
||||||
Timer.Sample timerSample = timingContext.getTimerSample();
|
Timer.Sample timerSample = timingContext.getTimerSample();
|
||||||
AutoTimer.apply(this.autoTimer, this.metricName, annotations,
|
AutoTimer.apply(this.autoTimer, this.metricName, annotations, (builder) -> timerSample
|
||||||
(builder) -> timerSample.stop(getTimer(builder, handler, request, response, exception)));
|
.stop(getTimer(builder, handler, request, response, exception).register(this.registry)));
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
logger.warn("Failed to record timer metrics", ex);
|
logger.warn("Failed to record timer metrics", ex);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.actuate.metrics.web.tomcat;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.tomcat.TomcatMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.tomcat.TomcatMetrics;
|
|
||||||
import org.apache.catalina.Container;
|
import org.apache.catalina.Container;
|
||||||
import org.apache.catalina.Context;
|
import org.apache.catalina.Context;
|
||||||
import org.apache.catalina.Manager;
|
import org.apache.catalina.Manager;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import io.micrometer.binder.jvm.JvmMemoryMetrics;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
import io.micrometer.core.instrument.MockClock;
|
import io.micrometer.core.instrument.MockClock;
|
||||||
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
|
|
||||||
import io.micrometer.core.instrument.simple.SimpleConfig;
|
import io.micrometer.core.instrument.simple.SimpleConfig;
|
||||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -19,8 +19,8 @@ package org.springframework.boot.actuate.metrics.cache;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
|
import io.micrometer.binder.cache.CaffeineCacheMetrics;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.CaffeineCacheMetrics;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.cache.caffeine.CaffeineCache;
|
import org.springframework.cache.caffeine.CaffeineCache;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2020 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -20,8 +20,8 @@ import java.util.Collections;
|
||||||
|
|
||||||
import com.hazelcast.map.IMap;
|
import com.hazelcast.map.IMap;
|
||||||
import com.hazelcast.spring.cache.HazelcastCache;
|
import com.hazelcast.spring.cache.HazelcastCache;
|
||||||
|
import io.micrometer.binder.cache.HazelcastCacheMetrics;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.HazelcastCacheMetrics;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -20,8 +20,8 @@ import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import io.micrometer.binder.cache.JCacheMetrics;
|
||||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||||
import io.micrometer.core.instrument.binder.cache.JCacheMetrics;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
|
|
|
||||||
|
|
@ -951,7 +951,7 @@ bom {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
library("Micrometer", "2.0.0-M1") {
|
library("Micrometer", "2.0.0-SNAPSHOT") {
|
||||||
group("io.micrometer") {
|
group("io.micrometer") {
|
||||||
modules = [
|
modules = [
|
||||||
"micrometer-registry-stackdriver" {
|
"micrometer-registry-stackdriver" {
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ dependencies {
|
||||||
implementation("ch.qos.logback:logback-classic")
|
implementation("ch.qos.logback:logback-classic")
|
||||||
implementation("com.zaxxer:HikariCP")
|
implementation("com.zaxxer:HikariCP")
|
||||||
implementation("io.micrometer:micrometer-core")
|
implementation("io.micrometer:micrometer-core")
|
||||||
|
implementation("io.micrometer:micrometer-binders")
|
||||||
implementation("io.micrometer:micrometer-registry-graphite")
|
implementation("io.micrometer:micrometer-registry-graphite")
|
||||||
implementation("io.micrometer:micrometer-registry-jmx")
|
implementation("io.micrometer:micrometer-registry-jmx")
|
||||||
implementation("io.projectreactor.netty:reactor-netty-http")
|
implementation("io.projectreactor.netty:reactor-netty-http")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
|
||||||
|
|
||||||
import com.mongodb.event.CommandEvent;
|
import com.mongodb.event.CommandEvent;
|
||||||
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
|
|
||||||
|
|
||||||
class CustomCommandTagsProvider implements MongoCommandTagsProvider {
|
class CustomCommandTagsProvider implements MongoCommandTagsProvider {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
|
||||||
|
|
||||||
import com.mongodb.event.ConnectionPoolCreatedEvent;
|
import com.mongodb.event.ConnectionPoolCreatedEvent;
|
||||||
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
|
||||||
import io.micrometer.core.instrument.Tag;
|
import io.micrometer.core.instrument.Tag;
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
|
|
||||||
|
|
||||||
public class CustomConnectionPoolTagsProvider implements MongoConnectionPoolTagsProvider {
|
public class CustomConnectionPoolTagsProvider implements MongoConnectionPoolTagsProvider {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2021 the original author or authors.
|
* Copyright 2012-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
|
||||||
|
|
||||||
import com.mongodb.event.CommandEvent
|
import com.mongodb.event.CommandEvent
|
||||||
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider
|
||||||
import io.micrometer.core.instrument.Tag
|
import io.micrometer.core.instrument.Tag
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider
|
|
||||||
|
|
||||||
class CustomCommandTagsProvider : MongoCommandTagsProvider {
|
class CustomCommandTagsProvider : MongoCommandTagsProvider {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider
|
import io.micrometer.binder.mongodb.MongoCommandTagsProvider
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
|
||||||
|
|
||||||
import com.mongodb.event.ConnectionPoolCreatedEvent
|
import com.mongodb.event.ConnectionPoolCreatedEvent
|
||||||
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider
|
||||||
import io.micrometer.core.instrument.Tag
|
import io.micrometer.core.instrument.Tag
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider
|
|
||||||
|
|
||||||
class CustomConnectionPoolTagsProvider : MongoConnectionPoolTagsProvider {
|
class CustomConnectionPoolTagsProvider : MongoConnectionPoolTagsProvider {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
|
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool
|
||||||
|
|
||||||
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider
|
import io.micrometer.binder.mongodb.MongoConnectionPoolTagsProvider
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ dependencies {
|
||||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||||
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||||
api("io.micrometer:micrometer-core")
|
api("io.micrometer:micrometer-core")
|
||||||
|
api("io.micrometer:micrometer-binders")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ dependencies {
|
||||||
testImplementation("com.unboundid:unboundid-ldapsdk")
|
testImplementation("com.unboundid:unboundid-ldapsdk")
|
||||||
testImplementation("io.lettuce:lettuce-core")
|
testImplementation("io.lettuce:lettuce-core")
|
||||||
testImplementation("io.micrometer:micrometer-registry-prometheus")
|
testImplementation("io.micrometer:micrometer-registry-prometheus")
|
||||||
|
testImplementation("io.micrometer:micrometer-binders")
|
||||||
testImplementation("io.projectreactor.netty:reactor-netty-http")
|
testImplementation("io.projectreactor.netty:reactor-netty-http")
|
||||||
testImplementation("io.projectreactor:reactor-core")
|
testImplementation("io.projectreactor:reactor-core")
|
||||||
testImplementation("io.projectreactor:reactor-test")
|
testImplementation("io.projectreactor:reactor-test")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue