Move metrics export into spring-boot-metrics
This commit is contained in:
committed by
Phillip Webb
parent
0464bf753f
commit
bf644c9d55
@@ -60,37 +60,16 @@ dependencies {
|
||||
optional("com.hazelcast:hazelcast-spring")
|
||||
optional("com.zaxxer:HikariCP")
|
||||
optional("io.lettuce:lettuce-core")
|
||||
optional("io.micrometer:micrometer-observation")
|
||||
optional("io.micrometer:micrometer-jakarta9")
|
||||
optional("io.micrometer:micrometer-observation")
|
||||
optional("io.micrometer:micrometer-tracing")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-brave")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-otel")
|
||||
optional("io.micrometer:micrometer-registry-appoptics")
|
||||
optional("io.micrometer:micrometer-registry-atlas") {
|
||||
exclude group: "javax.inject", module: "javax.inject"
|
||||
}
|
||||
optional("io.micrometer:micrometer-registry-datadog")
|
||||
optional("io.micrometer:micrometer-registry-dynatrace")
|
||||
optional("io.micrometer:micrometer-registry-elastic")
|
||||
optional("io.micrometer:micrometer-registry-ganglia")
|
||||
optional("io.micrometer:micrometer-registry-graphite")
|
||||
optional("io.micrometer:micrometer-registry-humio")
|
||||
optional("io.micrometer:micrometer-registry-influx")
|
||||
optional("io.micrometer:micrometer-registry-jmx")
|
||||
optional("io.micrometer:micrometer-registry-kairos")
|
||||
optional("io.micrometer:micrometer-registry-new-relic")
|
||||
optional("io.micrometer:micrometer-registry-otlp")
|
||||
optional("io.micrometer:micrometer-registry-prometheus")
|
||||
optional("io.micrometer:micrometer-registry-stackdriver") {
|
||||
exclude group: "javax.annotation", module: "javax.annotation-api"
|
||||
}
|
||||
optional("io.micrometer:micrometer-registry-signalfx")
|
||||
optional("io.micrometer:micrometer-registry-statsd")
|
||||
optional("io.zipkin.reporter2:zipkin-reporter-brave")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-zipkin")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("io.projectreactor.netty:reactor-netty-http")
|
||||
optional("io.prometheus:prometheus-metrics-exporter-pushgateway")
|
||||
optional("io.prometheus:prometheus-metrics-tracer-common")
|
||||
optional("io.r2dbc:r2dbc-pool")
|
||||
optional("io.r2dbc:r2dbc-proxy")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
@@ -135,8 +114,10 @@ dependencies {
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-web-server-test"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-metrics")))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
|
||||
testImplementation("io.micrometer:micrometer-observation-test")
|
||||
testImplementation("io.micrometer:micrometer-registry-prometheus")
|
||||
testImplementation("io.opentelemetry:opentelemetry-exporter-common")
|
||||
testImplementation("io.projectreactor:reactor-test")
|
||||
testImplementation("io.prometheus:prometheus-metrics-exposition-formats")
|
||||
@@ -157,6 +138,7 @@ dependencies {
|
||||
testImplementation("org.springframework.security:spring-security-test")
|
||||
testImplementation("org.yaml:snakeyaml")
|
||||
|
||||
testRuntimeOnly("io.grpc:grpc-api:1.72.0")
|
||||
testRuntimeOnly("jakarta.management.j2ee:jakarta.management.j2ee-api")
|
||||
testRuntimeOnly("jakarta.transaction:jakarta.transaction-api")
|
||||
testRuntimeOnly("org.opensaml:opensaml-core:4.0.1")
|
||||
|
||||
@@ -20,7 +20,6 @@ import io.micrometer.core.instrument.MeterRegistry;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.data.DataMetricsProperties.Repository;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.metrics.data.DefaultRepositoryTagsProvider;
|
||||
import org.springframework.boot.actuate.metrics.data.MetricsRepositoryMethodInvocationListener;
|
||||
import org.springframework.boot.actuate.metrics.data.RepositoryTagsProvider;
|
||||
@@ -32,6 +31,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.util.function.SingletonSupplier;
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.signalfx.SignalFxConfig;
|
||||
import io.micrometer.signalfx.SignalFxMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for exporting metrics to SignalFX.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
after = MetricsAutoConfiguration.class)
|
||||
@ConditionalOnBean(Clock.class)
|
||||
@ConditionalOnClass(SignalFxMeterRegistry.class)
|
||||
@ConditionalOnEnabledMetricsExport("signalfx")
|
||||
@EnableConfigurationProperties(SignalFxProperties.class)
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public class SignalFxMetricsExportAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SignalFxConfig signalfxConfig(SignalFxProperties props) {
|
||||
return new SignalFxPropertiesConfigAdapter(props);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SignalFxMeterRegistry signalFxMeterRegistry(SignalFxConfig config, Clock clock) {
|
||||
return new SignalFxMeterRegistry(config, clock);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring metrics export
|
||||
* to SignalFX.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.signalfx.metrics.export")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public class SignalFxProperties extends StepRegistryProperties {
|
||||
|
||||
/**
|
||||
* Step size (i.e. reporting frequency) to use.
|
||||
*/
|
||||
private Duration step = Duration.ofSeconds(10);
|
||||
|
||||
/**
|
||||
* SignalFX access token.
|
||||
*/
|
||||
private String accessToken;
|
||||
|
||||
/**
|
||||
* URI to ship metrics to.
|
||||
*/
|
||||
private String uri = "https://ingest.signalfx.com";
|
||||
|
||||
/**
|
||||
* Uniquely identifies the app instance that is publishing metrics to SignalFx.
|
||||
* Defaults to the local host name.
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* Type of histogram to publish.
|
||||
*/
|
||||
private HistogramType publishedHistogramType = HistogramType.DEFAULT;
|
||||
|
||||
@Override
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public Duration getStep() {
|
||||
return this.step;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setStep(Duration step) {
|
||||
this.step = step;
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public String getAccessToken() {
|
||||
return this.accessToken;
|
||||
}
|
||||
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public String getUri() {
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public String getSource() {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public HistogramType getPublishedHistogramType() {
|
||||
return this.publishedHistogramType;
|
||||
}
|
||||
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setPublishedHistogramType(HistogramType publishedHistogramType) {
|
||||
this.publishedHistogramType = publishedHistogramType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public boolean isEnabled() {
|
||||
return super.isEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public Duration getConnectTimeout() {
|
||||
return super.getConnectTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setConnectTimeout(Duration connectTimeout) {
|
||||
super.setConnectTimeout(connectTimeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public Duration getReadTimeout() {
|
||||
return super.getReadTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setReadTimeout(Duration readTimeout) {
|
||||
super.setReadTimeout(readTimeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
@DeprecatedConfigurationProperty(since = "3.5.0", reason = "Deprecated in Micrometer 1.15.0")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public Integer getBatchSize() {
|
||||
return super.getBatchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public void setBatchSize(Integer batchSize) {
|
||||
super.setBatchSize(batchSize);
|
||||
}
|
||||
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public enum HistogramType {
|
||||
|
||||
/**
|
||||
* Default, time-based histogram.
|
||||
*/
|
||||
DEFAULT,
|
||||
|
||||
/**
|
||||
* Cumulative histogram.
|
||||
*/
|
||||
CUMULATIVE,
|
||||
|
||||
/**
|
||||
* Delta histogram.
|
||||
*/
|
||||
DELTA
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import io.micrometer.signalfx.SignalFxConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link SignalFxProperties} to a {@link SignalFxConfig}.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public class SignalFxPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<SignalFxProperties>
|
||||
implements SignalFxConfig {
|
||||
|
||||
public SignalFxPropertiesConfigAdapter(SignalFxProperties properties) {
|
||||
super(properties);
|
||||
accessToken(); // validate that an access token is set
|
||||
}
|
||||
|
||||
@Override
|
||||
public String prefix() {
|
||||
return "management.signalfx.metrics.export";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String accessToken() {
|
||||
return get(SignalFxProperties::getAccessToken, SignalFxConfig.super::accessToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String uri() {
|
||||
return get(SignalFxProperties::getUri, SignalFxConfig.super::uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String source() {
|
||||
return get(SignalFxProperties::getSource, SignalFxConfig.super::source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean publishCumulativeHistogram() {
|
||||
return get(this::isPublishCumulativeHistogram, SignalFxConfig.super::publishCumulativeHistogram);
|
||||
}
|
||||
|
||||
private boolean isPublishCumulativeHistogram(SignalFxProperties properties) {
|
||||
return SignalFxProperties.HistogramType.CUMULATIVE == properties.getPublishedHistogramType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean publishDeltaHistogram() {
|
||||
return get(this::isPublishDeltaHistogram, SignalFxConfig.super::publishDeltaHistogram);
|
||||
}
|
||||
|
||||
private boolean isPublishDeltaHistogram(SignalFxProperties properties) {
|
||||
return SignalFxProperties.HistogramType.DELTA == properties.getPublishedHistogramType();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for exporting actuator metrics to SignalFX.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
@@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.SimpleAutowireCandidateResolver;
|
||||
import org.springframework.boot.LazyInitializationExcludeFilter;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -35,6 +34,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
@@ -21,7 +21,6 @@ import io.micrometer.core.instrument.config.MeterFilter;
|
||||
import io.micrometer.observation.Observation;
|
||||
import io.micrometer.observation.ObservationRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationProperties;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
@@ -33,6 +32,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.OnlyOnceLoggingDenyMeterFilter;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.server.reactive.observation.DefaultServerRequestObservationConvention;
|
||||
|
||||
@@ -23,7 +23,6 @@ import io.micrometer.observation.ObservationRegistry;
|
||||
import jakarta.servlet.DispatcherType;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationProperties;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
@@ -37,6 +36,7 @@ import org.springframework.boot.metrics.OnlyOnceLoggingDenyMeterFilter;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -21,13 +21,13 @@ import io.micrometer.tracing.Tracer;
|
||||
import io.prometheus.metrics.tracer.common.SpanContext;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.util.function.SingletonSupplier;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,24 +14,6 @@ org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfig
|
||||
org.springframework.boot.actuate.autoconfigure.management.HeapDumpWebEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.management.ThreadDumpEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics.AppOpticsMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.atlas.AtlasMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.datadog.DatadogMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace.DynatraceMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.elastic.ElasticMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia.GangliaMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.graphite.GraphiteMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.humio.HumioMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.influx.InfluxMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.kairos.KairosMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic.NewRelicMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver.StackdriverMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdMetricsExportAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.task.TaskExecutorMetricsAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.observation.batch.BatchObservationAutoConfiguration
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.signalfx.SignalFxConfig;
|
||||
import io.micrometer.signalfx.SignalFxMeterRegistry;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SignalFxMetricsExportAutoConfiguration}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
class SignalFxMetricsExportAutoConfigurationTests {
|
||||
|
||||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(SignalFxMetricsExportAutoConfiguration.class));
|
||||
|
||||
@Test
|
||||
void backsOffWithoutAClock() {
|
||||
this.contextRunner.run((context) -> assertThat(context).doesNotHaveBean(SignalFxMeterRegistry.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void failsWithoutAnAccessToken() {
|
||||
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
|
||||
.run((context) -> assertThat(context).hasFailed());
|
||||
}
|
||||
|
||||
@Test
|
||||
void autoConfiguresWithAnAccessToken() {
|
||||
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
|
||||
.withPropertyValues("management.signalfx.metrics.export.access-token=abcde")
|
||||
.run((context) -> assertThat(context).hasSingleBean(SignalFxMeterRegistry.class)
|
||||
.hasSingleBean(Clock.class)
|
||||
.hasSingleBean(SignalFxConfig.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void autoConfigurationCanBeDisabledWithDefaultsEnabledProperty() {
|
||||
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
|
||||
.withPropertyValues("management.defaults.metrics.export.enabled=false")
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(SignalFxMeterRegistry.class)
|
||||
.doesNotHaveBean(SignalFxConfig.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void autoConfigurationCanBeDisabledWithSpecificEnabledProperty() {
|
||||
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
|
||||
.withPropertyValues("management.signalfx.metrics.export.enabled=false")
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(SignalFxMeterRegistry.class)
|
||||
.doesNotHaveBean(SignalFxConfig.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void allowsConfigToBeCustomized() {
|
||||
this.contextRunner.withPropertyValues("management.signalfx.metrics.export.access-token=abcde")
|
||||
.withUserConfiguration(CustomConfigConfiguration.class)
|
||||
.run((context) -> assertThat(context).hasSingleBean(Clock.class)
|
||||
.hasSingleBean(SignalFxMeterRegistry.class)
|
||||
.hasSingleBean(SignalFxConfig.class)
|
||||
.hasBean("customConfig"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void allowsRegistryToBeCustomized() {
|
||||
this.contextRunner.withPropertyValues("management.signalfx.metrics.export.access-token=abcde")
|
||||
.withUserConfiguration(CustomRegistryConfiguration.class)
|
||||
.run((context) -> assertThat(context).hasSingleBean(Clock.class)
|
||||
.hasSingleBean(SignalFxConfig.class)
|
||||
.hasSingleBean(SignalFxMeterRegistry.class)
|
||||
.hasBean("customRegistry"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void stopsMeterRegistryWhenContextIsClosed() {
|
||||
this.contextRunner.withPropertyValues("management.signalfx.metrics.export.access-token=abcde")
|
||||
.withUserConfiguration(BaseConfiguration.class)
|
||||
.run((context) -> {
|
||||
SignalFxMeterRegistry registry = context.getBean(SignalFxMeterRegistry.class);
|
||||
assertThat(registry.isClosed()).isFalse();
|
||||
context.close();
|
||||
assertThat(registry.isClosed()).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
static class BaseConfiguration {
|
||||
|
||||
@Bean
|
||||
Clock customClock() {
|
||||
return Clock.SYSTEM;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import(BaseConfiguration.class)
|
||||
static class CustomConfigConfiguration {
|
||||
|
||||
@Bean
|
||||
SignalFxConfig customConfig() {
|
||||
return (key) -> {
|
||||
if ("signalfx.accessToken".equals(key)) {
|
||||
return "abcde";
|
||||
}
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import(BaseConfiguration.class)
|
||||
static class CustomRegistryConfiguration {
|
||||
|
||||
@Bean
|
||||
SignalFxMeterRegistry customRegistry(SignalFxConfig config, Clock clock) {
|
||||
return new SignalFxMeterRegistry(config, clock);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapterTests;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SignalFxPropertiesConfigAdapter}.
|
||||
*
|
||||
* @author Mirko Sobeck
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
class SignalFxPropertiesConfigAdapterTests
|
||||
extends StepRegistryPropertiesConfigAdapterTests<SignalFxProperties, SignalFxPropertiesConfigAdapter> {
|
||||
|
||||
protected SignalFxPropertiesConfigAdapterTests() {
|
||||
super(SignalFxPropertiesConfigAdapter.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SignalFxProperties createProperties() {
|
||||
SignalFxProperties signalFxProperties = new SignalFxProperties();
|
||||
signalFxProperties.setAccessToken("ABC");
|
||||
return signalFxProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SignalFxPropertiesConfigAdapter createConfigAdapter(SignalFxProperties properties) {
|
||||
return new SignalFxPropertiesConfigAdapter(properties);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesAccessTokenIsSetAdapterAccessTokenReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
assertThat(createConfigAdapter(properties).accessToken()).isEqualTo("ABC");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesUriIsSetAdapterUriReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setUri("https://example.signalfx.com");
|
||||
assertThat(createConfigAdapter(properties).uri()).isEqualTo("https://example.signalfx.com");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesSourceIsSetAdapterSourceReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setSource("DESKTOP-GA5");
|
||||
assertThat(createConfigAdapter(properties).source()).isEqualTo("DESKTOP-GA5");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsCumulativeAdapterPublishCumulativeHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(SignalFxProperties.HistogramType.CUMULATIVE);
|
||||
assertThat(createConfigAdapter(properties).publishCumulativeHistogram()).isTrue();
|
||||
assertThat(createConfigAdapter(properties).publishDeltaHistogram()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsDeltaAdapterPublishDeltaHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(SignalFxProperties.HistogramType.DELTA);
|
||||
assertThat(createConfigAdapter(properties).publishDeltaHistogram()).isTrue();
|
||||
assertThat(createConfigAdapter(properties).publishCumulativeHistogram()).isFalse();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
|
||||
import io.micrometer.signalfx.SignalFxConfig;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link SignalFxProperties}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @deprecated since 3.5.0 for removal in 4.0.0
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
class SignalFxPropertiesTests extends StepRegistryPropertiesTests {
|
||||
|
||||
@Test
|
||||
void defaultValuesAreConsistent() {
|
||||
SignalFxProperties properties = new SignalFxProperties();
|
||||
SignalFxConfig config = (key) -> null;
|
||||
assertStepRegistryDefaultValues(properties, config);
|
||||
// access token is mandatory
|
||||
assertThat(properties.getUri()).isEqualTo(config.uri());
|
||||
// source has no static default value
|
||||
// Not publishing cumulative or delta histograms implies that the default
|
||||
// histogram type should be published.
|
||||
assertThat(config.publishCumulativeHistogram()).isFalse();
|
||||
assertThat(config.publishDeltaHistogram()).isFalse();
|
||||
assertThat(properties.getPublishedHistogramType()).isEqualTo(SignalFxProperties.HistogramType.DEFAULT);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,13 +27,13 @@ import org.glassfish.jersey.micrometer.server.ObservationApplicationEventListene
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.jersey.autoconfigure.JerseyAutoConfiguration;
|
||||
import org.springframework.boot.jersey.autoconfigure.ResourceConfigCustomizer;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
@@ -21,20 +21,20 @@ import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.atlas.AtlasMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.datadog.DatadogMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia.GangliaMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.graphite.GraphiteMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.influx.InfluxMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic.NewRelicMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.atlas.AtlasMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.datadog.DatadogMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ganglia.GangliaMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.graphite.GraphiteMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.influx.InfluxMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.jmx.JmxMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.newrelic.NewRelicMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.statsd.StatsdMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.AbstractApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -46,7 +46,6 @@ import org.springframework.util.Assert;
|
||||
* @author Jon Schneider
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public final class MetricsRun {
|
||||
|
||||
private static final Set<Class<?>> EXPORT_AUTO_CONFIGURATIONS;
|
||||
@@ -63,8 +62,6 @@ public final class MetricsRun {
|
||||
implementations.add(OtlpMetricsExportAutoConfiguration.class);
|
||||
implementations.add(PrometheusMetricsExportAutoConfiguration.class);
|
||||
implementations.add(SimpleMetricsExportAutoConfiguration.class);
|
||||
implementations.add(
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxMetricsExportAutoConfiguration.class);
|
||||
implementations.add(StatsdMetricsExportAutoConfiguration.class);
|
||||
EXPORT_AUTO_CONFIGURATIONS = Collections.unmodifiableSet(implementations);
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
|
||||
import io.prometheus.metrics.tracer.common.SpanContext;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||
import org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -50,6 +50,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-ldap"))
|
||||
optional(project(":spring-boot-project:spring-boot-liquibase"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional(project(":spring-boot-project:spring-boot-mongodb"))
|
||||
optional(project(":spring-boot-project:spring-boot-neo4j"))
|
||||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.core.RunningService;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails;
|
||||
|
||||
/**
|
||||
* {@link DockerComposeConnectionDetailsFactory} to create
|
||||
@@ -37,7 +37,7 @@ class OpenTelemetryMetricsDockerComposeConnectionDetailsFactory
|
||||
|
||||
OpenTelemetryMetricsDockerComposeConnectionDetailsFactory() {
|
||||
super(OPENTELEMETRY_IMAGE_NAMES,
|
||||
"org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsExportAutoConfiguration");
|
||||
"org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsExportAutoConfiguration");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -113,7 +113,7 @@ The following service connections are currently supported:
|
||||
| javadoc:org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib", "grafana/otel-lgtm"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib", "grafana/otel-lgtm"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails[]
|
||||
|
||||
@@ -158,7 +158,7 @@ The following service connection factories are provided in the `spring-boot-test
|
||||
| javadoc:org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib" or of type javadoc:org.testcontainers.grafana.LgtmStackContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib" or of type javadoc:org.testcontainers.grafana.LgtmStackContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails[]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "java-test-fixtures"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
@@ -14,12 +15,35 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
optional("ch.qos.logback:logback-classic")
|
||||
optional("io.micrometer:micrometer-java21")
|
||||
optional("io.micrometer:micrometer-registry-appoptics")
|
||||
optional("io.micrometer:micrometer-registry-atlas") {
|
||||
exclude group: "javax.inject", module: "javax.inject"
|
||||
}
|
||||
optional("io.micrometer:micrometer-registry-datadog")
|
||||
optional("io.micrometer:micrometer-registry-dynatrace")
|
||||
optional("io.micrometer:micrometer-registry-elastic")
|
||||
optional("io.micrometer:micrometer-registry-ganglia")
|
||||
optional("io.micrometer:micrometer-registry-graphite")
|
||||
optional("io.micrometer:micrometer-registry-humio")
|
||||
optional("io.micrometer:micrometer-registry-influx")
|
||||
optional("io.micrometer:micrometer-registry-jmx")
|
||||
optional("io.micrometer:micrometer-registry-kairos")
|
||||
optional("io.micrometer:micrometer-registry-new-relic")
|
||||
optional("io.micrometer:micrometer-registry-otlp")
|
||||
optional("io.micrometer:micrometer-registry-prometheus")
|
||||
optional("io.micrometer:micrometer-registry-stackdriver") {
|
||||
exclude group: "javax.annotation", module: "javax.annotation-api"
|
||||
}
|
||||
optional("io.micrometer:micrometer-registry-statsd")
|
||||
optional("io.prometheus:prometheus-metrics-exporter-pushgateway")
|
||||
optional("org.apache.kafka:kafka-streams")
|
||||
optional("org.apache.logging.log4j:log4j-core")
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
|
||||
testFixturesImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("com.fasterxml.jackson.core:jackson-databind")
|
||||
|
||||
@@ -97,7 +97,6 @@ public final class MeterValue {
|
||||
* Return a new {@link MeterValue} instance for the given double value.
|
||||
* @param value the source value
|
||||
* @return a {@link MeterValue} instance
|
||||
* @since 2.3.0
|
||||
*/
|
||||
public static MeterValue valueOf(double value) {
|
||||
return new MeterValue(value);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export;
|
||||
package org.springframework.boot.metrics.autoconfigure.export;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -32,7 +32,7 @@ import org.springframework.context.annotation.Conditional;
|
||||
* not configured.
|
||||
*
|
||||
* @author Chris Bono
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export;
|
||||
package org.springframework.boot.metrics.autoconfigure.export;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.appoptics;
|
||||
|
||||
import io.micrometer.appoptics.AppOpticsConfig;
|
||||
import io.micrometer.appoptics.AppOpticsMeterRegistry;
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.appoptics;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring AppOptics
|
||||
* metrics export.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.appoptics.metrics.export")
|
||||
public class AppOpticsProperties extends StepRegistryProperties {
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.appoptics;
|
||||
|
||||
import io.micrometer.appoptics.AppOpticsConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link AppOpticsProperties} to an {@link AppOpticsConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to AppOptics.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.appoptics;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.appoptics;
|
||||
@@ -14,14 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.atlas;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.atlas;
|
||||
|
||||
import com.netflix.spectator.atlas.AtlasConfig;
|
||||
import io.micrometer.atlas.AtlasMeterRegistry;
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -30,6 +28,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.atlas;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.atlas;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.atlas.metrics.export")
|
||||
public class AtlasProperties {
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.atlas;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.atlas;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import com.netflix.spectator.atlas.AtlasConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link AtlasProperties} to an {@link AtlasConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Atlas.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.atlas;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.atlas;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.datadog;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.datadog;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.datadog.DatadogConfig;
|
||||
import io.micrometer.datadog.DatadogMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.datadog;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.datadog;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Datadog
|
||||
@@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.datadog.metrics.export")
|
||||
public class DatadogProperties extends StepRegistryProperties {
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.datadog;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.datadog;
|
||||
|
||||
import io.micrometer.datadog.DatadogConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link DatadogProperties} to a {@link DatadogConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Datadog.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.datadog;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.datadog;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.dynatrace;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.dynatrace.DynatraceConfig;
|
||||
import io.micrometer.dynatrace.DynatraceMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.dynatrace;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Dynatrace
|
||||
@@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Georg Pirklbauer
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.dynatrace.metrics.export")
|
||||
public class DynatraceProperties extends StepRegistryProperties {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.dynatrace;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@@ -22,9 +22,9 @@ import java.util.function.Function;
|
||||
import io.micrometer.dynatrace.DynatraceApiVersion;
|
||||
import io.micrometer.dynatrace.DynatraceConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace.DynatraceProperties.V1;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace.DynatraceProperties.V2;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.dynatrace.DynatraceProperties.V1;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.dynatrace.DynatraceProperties.V2;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link DynatraceProperties} to a {@link DynatraceConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Dynatrace.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.dynatrace;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.dynatrace;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.elastic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.elastic;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.elastic.ElasticConfig;
|
||||
import io.micrometer.elastic.ElasticMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -32,6 +30,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.elastic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.elastic;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Elastic
|
||||
* metrics export.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.elastic.metrics.export")
|
||||
public class ElasticProperties extends StepRegistryProperties {
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.elastic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.elastic;
|
||||
|
||||
import io.micrometer.elastic.ElasticConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link ElasticProperties} to an {@link ElasticConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Elastic.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.elastic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.elastic;
|
||||
@@ -14,14 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.ganglia;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.ganglia.GangliaConfig;
|
||||
import io.micrometer.ganglia.GangliaMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -30,13 +28,15 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for exporting metrics to Ganglia.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.ganglia;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.ganglia.metrics.export")
|
||||
public class GangliaProperties {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.ganglia;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import info.ganglia.gmetric4j.gmetric.GMetric;
|
||||
import io.micrometer.ganglia.GangliaConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link GangliaProperties} to a {@link GangliaConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Ganglia.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.ganglia;
|
||||
@@ -14,14 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.graphite;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.graphite;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.graphite.GraphiteConfig;
|
||||
import io.micrometer.graphite.GraphiteMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -30,13 +28,15 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for exporting metrics to Graphite.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.graphite;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.graphite;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.ObjectUtils;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.graphite.metrics.export")
|
||||
public class GraphiteProperties {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.graphite;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.graphite;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import io.micrometer.graphite.GraphiteConfig;
|
||||
import io.micrometer.graphite.GraphiteProtocol;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link GraphiteProperties} to a {@link GraphiteConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Graphite.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.graphite;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.graphite;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.humio;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.humio.HumioConfig;
|
||||
import io.micrometer.humio.HumioMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,21 +14,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.humio;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Humio metrics
|
||||
* export.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.humio.metrics.export")
|
||||
public class HumioProperties extends StepRegistryProperties {
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.humio;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.micrometer.humio.HumioConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link HumioProperties} to a {@link HumioConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Humio.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.humio;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.humio;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.influx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.influx;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.influx.InfluxConfig;
|
||||
import io.micrometer.influx.InfluxMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.influx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.influx;
|
||||
|
||||
import io.micrometer.influx.InfluxApiVersion;
|
||||
import io.micrometer.influx.InfluxConsistency;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Influx metrics
|
||||
@@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.influx.metrics.export")
|
||||
public class InfluxProperties extends StepRegistryProperties {
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.influx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.influx;
|
||||
|
||||
import io.micrometer.influx.InfluxApiVersion;
|
||||
import io.micrometer.influx.InfluxConfig;
|
||||
import io.micrometer.influx.InfluxConsistency;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link InfluxProperties} to an {@link InfluxConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to InfluxDB.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.influx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.influx;
|
||||
@@ -14,14 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.jmx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.jmx;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.jmx.JmxConfig;
|
||||
import io.micrometer.jmx.JmxMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -30,13 +28,15 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for exporting metrics to JMX.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.jmx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.jmx;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.jmx.metrics.export")
|
||||
public class JmxProperties {
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.jmx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.jmx;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import io.micrometer.jmx.JmxConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link JmxProperties} to a {@link JmxConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to JMX.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.jmx;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.jmx;
|
||||
@@ -14,15 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.kairos;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.kairos;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
import io.micrometer.kairos.KairosConfig;
|
||||
import io.micrometer.kairos.KairosMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -31,6 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.kairos;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.kairos;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring KairosDB
|
||||
* metrics export.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.kairos.metrics.export")
|
||||
public class KairosProperties extends StepRegistryProperties {
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.kairos;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.kairos;
|
||||
|
||||
import io.micrometer.kairos.KairosConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link KairosProperties} to a {@link KairosConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to KairosDB.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.kairos;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.kairos;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.newrelic;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.ipc.http.HttpUrlConnectionSender;
|
||||
@@ -25,8 +25,6 @@ import io.micrometer.newrelic.NewRelicInsightsAgentClientProvider;
|
||||
import io.micrometer.newrelic.NewRelicInsightsApiClientProvider;
|
||||
import io.micrometer.newrelic.NewRelicMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -35,6 +33,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.newrelic;
|
||||
|
||||
import io.micrometer.newrelic.ClientProviderType;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring New Relic
|
||||
@@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
* @author Neil Powell
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.newrelic.metrics.export")
|
||||
public class NewRelicProperties extends StepRegistryProperties {
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.newrelic;
|
||||
|
||||
import io.micrometer.newrelic.ClientProviderType;
|
||||
import io.micrometer.newrelic.NewRelicConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link NewRelicProperties} to a {@link NewRelicConfig}.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Neil Powell
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class NewRelicPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<NewRelicProperties>
|
||||
implements NewRelicConfig {
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to New Relic.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.newrelic;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.otlp;
|
||||
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.boot.autoconfigure.service.connection.ConnectionDetai
|
||||
* Details required to establish a connection to an OpenTelemetry Collector service.
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @since 3.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface OtlpMetricsConnectionDetails extends ConnectionDetails {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.otlp;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.registry.otlp.OtlpConfig;
|
||||
@@ -22,8 +22,6 @@ import io.micrometer.registry.otlp.OtlpMeterRegistry;
|
||||
import io.micrometer.registry.otlp.OtlpMetricsSender;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -34,6 +32,8 @@ import org.springframework.boot.autoconfigure.thread.Threading;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetryProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -44,7 +44,7 @@ import org.springframework.core.task.VirtualThreadTaskExecutor;
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.otlp;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
@@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import io.micrometer.registry.otlp.AggregationTemporality;
|
||||
import io.micrometer.registry.otlp.HistogramFlavor;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring OTLP metrics
|
||||
@@ -32,7 +32,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.otlp.metrics.export")
|
||||
public class OtlpMetricsProperties extends StepRegistryProperties {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.otlp;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -26,8 +26,8 @@ import io.micrometer.registry.otlp.AggregationTemporality;
|
||||
import io.micrometer.registry.otlp.HistogramFlavor;
|
||||
import io.micrometer.registry.otlp.OtlpConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsProperties.Meter;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsProperties.Meter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetryProperties;
|
||||
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetryResourceAttributes;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to OTLP.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.otlp;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.otlp;
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Auto-configuration for metrics exporter.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export;
|
||||
package org.springframework.boot.metrics.autoconfigure.export;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.prometheus;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.prometheusmetrics.PrometheusConfig;
|
||||
@@ -28,8 +28,6 @@ import io.prometheus.metrics.tracer.common.SpanContext;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager;
|
||||
import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
@@ -42,6 +40,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Jon Schneider
|
||||
* @author David J. M. Karlsen
|
||||
* @author Jonatan Ivanov
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.prometheus;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
@@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.prometheus.metrics.export")
|
||||
public class PrometheusProperties {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.prometheus;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Map;
|
||||
@@ -22,7 +22,7 @@ import java.util.Properties;
|
||||
|
||||
import io.micrometer.prometheusmetrics.PrometheusConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link PrometheusProperties} to a {@link PrometheusConfig}.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Prometheus.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.prometheus;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||
* @param <T> the properties type
|
||||
* @author Phillip Webb
|
||||
* @author Nikolay Rybak
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class PropertiesConfigAdapter<T> {
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesSource;
|
||||
|
||||
/**
|
||||
* Base class for properties that configure a metrics registry that pushes aggregated
|
||||
* metrics on a regular interval.
|
||||
@@ -25,8 +27,9 @@ import java.time.Duration;
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationPropertiesSource
|
||||
public abstract class PushRegistryProperties {
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -27,7 +27,7 @@ import io.micrometer.core.instrument.push.PushRegistryConfig;
|
||||
* @author Jon Schneider
|
||||
* @author Phillip Webb
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract class PushRegistryPropertiesConfigAdapter<T extends PushRegistryProperties>
|
||||
extends PropertiesConfigAdapter<T> implements PushRegistryConfig {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
|
||||
/**
|
||||
* {@link PushRegistryProperties} extensions for registries that are step-normalized.
|
||||
@@ -22,7 +22,7 @@ package org.springframework.boot.actuate.autoconfigure.metrics.export.properties
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract class StepRegistryProperties extends PushRegistryProperties {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
|
||||
import io.micrometer.core.instrument.step.StepRegistryConfig;
|
||||
|
||||
@@ -25,7 +25,7 @@ import io.micrometer.core.instrument.step.StepRegistryConfig;
|
||||
* @author Jon Schneider
|
||||
* @author Phillip Webb
|
||||
* @author Artsiom Yudovin
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract class StepRegistryPropertiesConfigAdapter<T extends StepRegistryProperties>
|
||||
extends PushRegistryPropertiesConfigAdapter<T> {
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Base properties and adapters used when exporting actuator metrics.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.properties;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.properties;
|
||||
@@ -14,14 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.simple;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.simple;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
import io.micrometer.core.instrument.simple.SimpleConfig;
|
||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -29,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* beans and only used as a fallback.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(before = CompositeMeterRegistryAutoConfiguration.class, after = MetricsAutoConfiguration.class)
|
||||
@ConditionalOnBean(Clock.class)
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.simple;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.simple;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.simple.metrics.export")
|
||||
public class SimpleProperties {
|
||||
@@ -14,20 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.simple;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.simple;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import io.micrometer.core.instrument.simple.CountingMode;
|
||||
import io.micrometer.core.instrument.simple.SimpleConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link SimpleProperties} to a {@link SimpleConfig}.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class SimplePropertiesConfigAdapter extends PropertiesConfigAdapter<SimpleProperties> implements SimpleConfig {
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to a simple in-memory store.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.simple;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.simple;
|
||||
@@ -14,14 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.stackdriver;
|
||||
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.stackdriver.StackdriverConfig;
|
||||
import io.micrometer.stackdriver.StackdriverMeterRegistry;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -30,6 +28,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.ConditionalOnEnabledMetricsExport;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Johannes Graf
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.stackdriver;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryProperties;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Stackdriver
|
||||
@@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Johannes Graf
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.stackdriver.metrics.export")
|
||||
public class StackdriverProperties extends StepRegistryProperties {
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.stackdriver;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.micrometer.stackdriver.StackdriverConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link StackdriverProperties} to a {@link StackdriverConfig}.
|
||||
*
|
||||
* @author Johannes Graf
|
||||
* @since 2.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class StackdriverPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<StackdriverProperties>
|
||||
implements StackdriverConfig {
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for exporting actuator metrics to Stackdriver.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver;
|
||||
package org.springframework.boot.metrics.autoconfigure.export.stackdriver;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user