Polish Micrometer tracing changes

See gh-30833
pull/30862/head
izeye 3 years ago committed by Andy Wilkinson
parent 0220624a13
commit 77c3b6c899

@ -23,7 +23,7 @@ import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontPropert
import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontProperties.Metrics.Export; import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontProperties.Metrics.Export;
/** /**
* Adapter to convert {@link WavefrontProperties.Metrics} to a {@link WavefrontConfig}. * Adapter to convert {@link WavefrontProperties} to a {@link WavefrontConfig}.
* *
* @author Jon Schneider * @author Jon Schneider
* @author Moritz Halbritter * @author Moritz Halbritter

@ -54,7 +54,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
/** /**
* Configurations for Open Telemetry. Those are imported by * Configurations for OpenTelemetry. Those are imported by
* {@link OpenTelemetryAutoConfiguration}. * {@link OpenTelemetryAutoConfiguration}.
* *
* @author Moritz Halbritter * @author Moritz Halbritter

@ -44,7 +44,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
/** /**
* {@link EnableAutoConfiguration Auto-configuration} for Wavefront. * {@link EnableAutoConfiguration Auto-configuration} for Wavefront tracing.
* *
* @author Moritz Halbritter * @author Moritz Halbritter
* @since 3.0.0 * @since 3.0.0

@ -34,8 +34,8 @@ import org.springframework.util.unit.DataSize;
/** /**
* {@link EnableAutoConfiguration Auto-configuration} for Wavefront common infrastructure. * {@link EnableAutoConfiguration Auto-configuration} for Wavefront common infrastructure.
* Metrics are auto-configured in {@link WavefrontMetricsExportAutoConfiguration}, tracing * Metrics are auto-configured in {@link WavefrontMetricsExportAutoConfiguration}, and
* is auto-configured in {@link WavefrontTracingAutoConfiguration}. * tracing is auto-configured in {@link WavefrontTracingAutoConfiguration}.
* *
* @author Moritz Halbritter * @author Moritz Halbritter
* @since 3.0.0 * @since 3.0.0

@ -41,13 +41,14 @@ public class WavefrontProperties {
private URI uri = URI.create("https://longboard.wavefront.com"); private URI uri = URI.create("https://longboard.wavefront.com");
/** /**
* Unique identifier for the app instance that is the source of metrics being * Unique identifier for the app instance that is the source of metrics and traces
* published to Wavefront. Defaults to the local host name. * being published to Wavefront. Defaults to the local host name.
*/ */
private String source; private String source;
/** /**
* API token used when publishing metrics directly to the Wavefront API host. * API token used when publishing metrics and traces directly to the Wavefront API
* host.
*/ */
private String apiToken; private String apiToken;

@ -64,14 +64,13 @@ class OpenTelemetryConfigurationsTracerConfigurationTests {
assertThat(context).hasBean("customTracer"); assertThat(context).hasBean("customTracer");
assertThat(context).hasSingleBean(Tracer.class); assertThat(context).hasSingleBean(Tracer.class);
}); });
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
private static class OpenTelemetryConfiguration { private static class OpenTelemetryConfiguration {
@Bean @Bean
OpenTelemetry tracer() { OpenTelemetry openTelemetry() {
return Mockito.mock(OpenTelemetry.class); return Mockito.mock(OpenTelemetry.class);
} }

@ -60,15 +60,6 @@ class ZipkinConfigurationsSenderConfigurationTests {
}); });
} }
@Test
void shouldNotSupplyRestTemplateSenderIfNoBuilderIsAvailable() {
this.contextRunner.run((context) -> {
assertThat(context).doesNotHaveBean(ZipkinRestTemplateSender.class);
assertThat(context).hasSingleBean(Sender.class);
assertThat(context).hasSingleBean(URLConnectionSender.class);
});
}
@Test @Test
void shouldBackOffOnCustomBeans() { void shouldBackOffOnCustomBeans() {
this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> { this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> {

Loading…
Cancel
Save