@Configuration @EnableConfigurationProperties(value={ZipkinProperties.class,org.springframework.cloud.sleuth.sampler.SamplerProperties.class}) @ConditionalOnProperty(value="spring.zipkin.enabled", matchIfMissing=true) @Import(value=ZipkinSenderConfigurationImportSelector.class) public class ZipkinAutoConfiguration extends Object
Auto-configuration
enables reporting to Zipkin via HTTP. Has a default Sampler
set as
PercentageBasedSampler
.
The ZipkinRestTemplateCustomizer
allows you to customize the RestTemplate
that is used to send Spans to Zipkin. Its default implementation - DefaultZipkinRestTemplateCustomizer
adds the GZip compression.PercentageBasedSampler
,
ZipkinRestTemplateCustomizer
,
DefaultZipkinRestTemplateCustomizer
Modifier and Type | Class and Description |
---|---|
protected static class |
ZipkinAutoConfiguration.DefaultEndpointLocatorConfiguration |
protected static class |
ZipkinAutoConfiguration.NonRefreshScopePercentageBasedSamplerConfiguration |
protected static class |
ZipkinAutoConfiguration.RefreshScopedPercentageBasedSamplerConfiguration |
protected static class |
ZipkinAutoConfiguration.RegistrationEndpointLocatorConfiguration |
Constructor and Description |
---|
ZipkinAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
zipkin2.reporter.Reporter<zipkin2.Span> |
reporter(SpanMetricReporter spanMetricReporter,
ZipkinProperties zipkin,
zipkin2.reporter.Sender sender)
Accepts a sender so you can plug-in any standard one.
|
ZipkinRestTemplateCustomizer |
zipkinRestTemplateCustomizer(ZipkinProperties zipkinProperties) |
SpanReporter |
zipkinSpanListener(zipkin2.reporter.Reporter<zipkin2.Span> reporter,
EndpointLocator endpointLocator,
org.springframework.core.env.Environment environment) |
@Bean @ConditionalOnMissingBean public zipkin2.reporter.Reporter<zipkin2.Span> reporter(SpanMetricReporter spanMetricReporter, ZipkinProperties zipkin, zipkin2.reporter.Sender sender)
@Bean @ConditionalOnMissingBean public ZipkinRestTemplateCustomizer zipkinRestTemplateCustomizer(ZipkinProperties zipkinProperties)
@Bean public SpanReporter zipkinSpanListener(zipkin2.reporter.Reporter<zipkin2.Span> reporter, EndpointLocator endpointLocator, org.springframework.core.env.Environment environment)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.