Rename and relocate ExemplarsAutoConfiguration

Rename `ExemplarsAutoConfiguration` and relocate it to a diffent
package to make it clear that it is for Prometheus.
pull/33098/head
Phillip Webb 2 years ago
parent a53141f8a4
commit 79ff11cb2b

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.tracing.exemplars;
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
import io.micrometer.tracing.Span;
import io.micrometer.tracing.Tracer;
@ -44,7 +44,7 @@ import org.springframework.util.function.SingletonSupplier;
@ConditionalOnBean(Tracer.class)
@ConditionalOnClass({ Tracer.class, SpanContextSupplier.class })
@ConditionalOnEnabledTracing
public class ExemplarsAutoConfiguration {
public class PrometheusExemplarsAutoConfiguration {
@Bean
@ConditionalOnMissingBean

@ -17,4 +17,4 @@
/**
* Auto-configuration for Prometheus Exemplars with Micrometer Tracing.
*/
package org.springframework.boot.actuate.autoconfigure.tracing.exemplars;
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;

@ -99,7 +99,7 @@ org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthContributor
org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.exemplars.ExemplarsAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.prometheus.PrometheusExemplarsAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.wavefront.WavefrontTracingAutoConfiguration
org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
org.springframework.boot.actuate.autoconfigure.web.exchanges.HttpExchangesAutoConfiguration

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.tracing.exemplars;
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
@ -38,18 +38,19 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
/**
* Tests for {@link ExemplarsAutoConfiguration}.
* Tests for {@link PrometheusExemplarsAutoConfiguration}.
*
* * @author Jonatan Ivanov
*/
class ExemplarsAutoConfigurationTests {
class PrometheusExemplarsAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("management.tracing.sampling.probability=1.0",
"management.metrics.distribution.percentiles-histogram.all=true")
.with(MetricsRun.limitedTo(PrometheusMetricsExportAutoConfiguration.class)).withConfiguration(
AutoConfigurations.of(ExemplarsAutoConfiguration.class, ObservationAutoConfiguration.class,
BraveAutoConfiguration.class, MicrometerTracingAutoConfiguration.class));
.with(MetricsRun.limitedTo(PrometheusMetricsExportAutoConfiguration.class))
.withConfiguration(AutoConfigurations.of(PrometheusExemplarsAutoConfiguration.class,
ObservationAutoConfiguration.class, BraveAutoConfiguration.class,
MicrometerTracingAutoConfiguration.class));
@Test
void shouldNotSupplyBeansIfTracingIsDisabled() {
Loading…
Cancel
Save