Deprecate SignalFX support
Closes gh-43962
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 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.
|
||||
@@ -38,6 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Jon Schneider
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 3.7.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
before = { CompositeMeterRegistryAutoConfiguration.class, SimpleMetricsExportAutoConfiguration.class },
|
||||
@@ -46,6 +47,8 @@ import org.springframework.context.annotation.Bean;
|
||||
@ConditionalOnClass(SignalFxMeterRegistry.class)
|
||||
@ConditionalOnEnabledMetricsExport("signalfx")
|
||||
@EnableConfigurationProperties(SignalFxProperties.class)
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public class SignalFxMetricsExportAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -20,6 +20,7 @@ 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
|
||||
@@ -29,8 +30,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 3.7.0
|
||||
*/
|
||||
@ConfigurationProperties("management.signalfx.metrics.export")
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
public class SignalFxProperties extends StepRegistryProperties {
|
||||
|
||||
/**
|
||||
@@ -60,47 +63,115 @@ public class SignalFxProperties extends StepRegistryProperties {
|
||||
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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -19,14 +19,16 @@ package org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx;
|
||||
import io.micrometer.signalfx.SignalFxConfig;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesConfigAdapter;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxProperties.HistogramType;
|
||||
|
||||
/**
|
||||
* Adapter to convert {@link SignalFxProperties} to a {@link SignalFxConfig}.
|
||||
*
|
||||
* @author Jon Schneider
|
||||
* @since 2.0.0
|
||||
* @deprecated since 3.5.0 for removal in 3.7.0
|
||||
*/
|
||||
@Deprecated(since = "3.5.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public class SignalFxPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<SignalFxProperties>
|
||||
implements SignalFxConfig {
|
||||
|
||||
@@ -61,7 +63,7 @@ public class SignalFxPropertiesConfigAdapter extends StepRegistryPropertiesConfi
|
||||
}
|
||||
|
||||
private boolean isPublishCumulativeHistogram(SignalFxProperties properties) {
|
||||
return HistogramType.CUMULATIVE == properties.getPublishedHistogramType();
|
||||
return SignalFxProperties.HistogramType.CUMULATIVE == properties.getPublishedHistogramType();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +72,7 @@ public class SignalFxPropertiesConfigAdapter extends StepRegistryPropertiesConfi
|
||||
}
|
||||
|
||||
private boolean isPublishDeltaHistogram(SignalFxProperties properties) {
|
||||
return HistogramType.DELTA == properties.getPublishedHistogramType();
|
||||
return SignalFxProperties.HistogramType.DELTA == properties.getPublishedHistogramType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
class SignalFxMetricsExportAutoConfigurationTests {
|
||||
|
||||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -19,7 +19,6 @@ 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 org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxProperties.HistogramType;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -28,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Mirko Sobeck
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
class SignalFxPropertiesConfigAdapterTests
|
||||
extends StepRegistryPropertiesConfigAdapterTests<SignalFxProperties, SignalFxPropertiesConfigAdapter> {
|
||||
|
||||
@@ -70,7 +70,7 @@ class SignalFxPropertiesConfigAdapterTests
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsCumulativeAdapterPublishCumulativeHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(HistogramType.CUMULATIVE);
|
||||
properties.setPublishedHistogramType(SignalFxProperties.HistogramType.CUMULATIVE);
|
||||
assertThat(createConfigAdapter(properties).publishCumulativeHistogram()).isTrue();
|
||||
assertThat(createConfigAdapter(properties).publishDeltaHistogram()).isFalse();
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class SignalFxPropertiesConfigAdapterTests
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsDeltaAdapterPublishDeltaHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(HistogramType.DELTA);
|
||||
properties.setPublishedHistogramType(SignalFxProperties.HistogramType.DELTA);
|
||||
assertThat(createConfigAdapter(properties).publishDeltaHistogram()).isTrue();
|
||||
assertThat(createConfigAdapter(properties).publishCumulativeHistogram()).isFalse();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -20,7 +20,6 @@ import io.micrometer.signalfx.SignalFxConfig;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryPropertiesTests;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxProperties.HistogramType;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -29,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
class SignalFxPropertiesTests extends StepRegistryPropertiesTests {
|
||||
|
||||
@Test
|
||||
@@ -43,7 +43,7 @@ class SignalFxPropertiesTests extends StepRegistryPropertiesTests {
|
||||
// histogram type should be published.
|
||||
assertThat(config.publishCumulativeHistogram()).isFalse();
|
||||
assertThat(config.publishDeltaHistogram()).isFalse();
|
||||
assertThat(properties.getPublishedHistogramType()).isEqualTo(HistogramType.DEFAULT);
|
||||
assertThat(properties.getPublishedHistogramType()).isEqualTo(SignalFxProperties.HistogramType.DEFAULT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -32,7 +32,6 @@ import org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxMetr
|
||||
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.signalfx.SignalFxMetricsExportAutoConfiguration;
|
||||
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;
|
||||
@@ -47,6 +46,7 @@ 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,7 +63,8 @@ public final class MetricsRun {
|
||||
implementations.add(OtlpMetricsExportAutoConfiguration.class);
|
||||
implementations.add(PrometheusMetricsExportAutoConfiguration.class);
|
||||
implementations.add(SimpleMetricsExportAutoConfiguration.class);
|
||||
implementations.add(SignalFxMetricsExportAutoConfiguration.class);
|
||||
implementations.add(
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxMetricsExportAutoConfiguration.class);
|
||||
implementations.add(StatsdMetricsExportAutoConfiguration.class);
|
||||
EXPORT_AUTO_CONFIGURATIONS = Collections.unmodifiableSet(implementations);
|
||||
}
|
||||
|
||||
@@ -1134,8 +1134,6 @@
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.otlp[#actuator.metrics.export.otlp]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.prometheus[#actuator.metrics.export.prometheus]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.prometheus[#production-ready-metrics-export-prometheus]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.signalfx[#actuator.metrics.export.signalfx]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.signalfx[#production-ready-metrics-export-signalfx]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.simple[#actuator.metrics.export.simple]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.simple[#production-ready-metrics-export-simple]
|
||||
* xref:reference:actuator/metrics.adoc#actuator.metrics.export.stackdriver[#actuator.metrics.export.stackdriver]
|
||||
|
||||
@@ -17,7 +17,6 @@ Spring Boot Actuator provides dependency management and auto-configuration for {
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.newrelic[]
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.otlp[]
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.prometheus[]
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.signalfx[]
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.simple[] (in-memory)
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.stackdriver[]
|
||||
- xref:actuator/metrics.adoc#actuator.metrics.export.statsd[]
|
||||
@@ -573,34 +572,6 @@ For advanced configuration, you can also provide your own javadoc:org.springfram
|
||||
|
||||
|
||||
|
||||
[[actuator.metrics.export.signalfx]]
|
||||
=== SignalFx
|
||||
|
||||
SignalFx registry periodically pushes metrics to {url-micrometer-docs-implementations}/signalFx[SignalFx].
|
||||
To export metrics to https://www.signalfx.com[SignalFx], you must provide your access token:
|
||||
|
||||
[configprops,yaml]
|
||||
----
|
||||
management:
|
||||
signalfx:
|
||||
metrics:
|
||||
export:
|
||||
access-token: "YOUR_ACCESS_TOKEN"
|
||||
----
|
||||
|
||||
You can also change the interval at which metrics are sent to SignalFx:
|
||||
|
||||
[configprops,yaml]
|
||||
----
|
||||
management:
|
||||
signalfx:
|
||||
metrics:
|
||||
export:
|
||||
step: "30s"
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[actuator.metrics.export.simple]]
|
||||
=== Simple
|
||||
|
||||
|
||||
Reference in New Issue
Block a user