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

@ -54,7 +54,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
/**
* Configurations for Open Telemetry. Those are imported by
* Configurations for OpenTelemetry. Those are imported by
* {@link OpenTelemetryAutoConfiguration}.
*
* @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) -> {

@ -589,7 +589,7 @@ If you are exporting metrics to https://www.wavefront.com/[Wavefront] directly,
----
management:
wavefront:
api-token: "YOUR_API_TOKEN"
api-token: "YOUR_API_TOKEN"
----
Alternatively, you can use a Wavefront sidecar or an internal proxy in your environment to forward metrics data to the Wavefront API host:
@ -598,7 +598,7 @@ Alternatively, you can use a Wavefront sidecar or an internal proxy in your envi
----
management:
wavefront:
uri: "proxy://localhost:2878"
uri: "proxy://localhost:2878"
----
NOTE: If you publish metrics to a Wavefront proxy (as described in https://docs.wavefront.com/proxies_installing.html[the Wavefront documentation]), the host must be in the `proxy://HOST:PORT` format.

Loading…
Cancel
Save