Merge pull request #30833 from izeye

* gh-30833:
  Polish Micrometer tracing changes

Closes gh-30833
pull/30862/head
Andy Wilkinson 3 years ago
commit 11efe24094

@ -23,7 +23,7 @@ import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontPropert
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 Moritz Halbritter

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

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

@ -41,13 +41,14 @@ public class WavefrontProperties {
private URI uri = URI.create("https://longboard.wavefront.com");
/**
* Unique identifier for the app instance that is the source of metrics being
* published to Wavefront. Defaults to the local host name.
* Unique identifier for the app instance that is the source of metrics and traces
* being published to Wavefront. Defaults to the local host name.
*/
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;

@ -64,14 +64,13 @@ class OpenTelemetryConfigurationsTracerConfigurationTests {
assertThat(context).hasBean("customTracer");
assertThat(context).hasSingleBean(Tracer.class);
});
}
@Configuration(proxyBeanMethods = false)
private static class OpenTelemetryConfiguration {
@Bean
OpenTelemetry tracer() {
OpenTelemetry openTelemetry() {
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
void shouldBackOffOnCustomBeans() {
this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> {

Loading…
Cancel
Save