@Configuration
@EnableConfigurationProperties(value={org.springframework.cloud.sleuth.sampler.SamplerProperties.class,GcpTraceProperties.class,org.springframework.cloud.sleuth.autoconfig.SleuthProperties.class})
@ConditionalOnProperty(value={"spring.sleuth.enabled","spring.cloud.gcp.trace.enabled"},
matchIfMissing=true)
@ConditionalOnClass(value=zipkin2.reporter.stackdriver.StackdriverSender.class)
@AutoConfigureBefore(value=org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration.class)
public class StackdriverTraceAutoConfiguration
extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
StackdriverTraceAutoConfiguration.NonRefreshScopeProbabilityBasedSamplerConfiguration
Configuration for non-refresh scope probability based sampler.
|
protected static class |
StackdriverTraceAutoConfiguration.RefreshScopedProbabilityBasedSamplerConfiguration
Configuration for refresh scope probability based sampler.
|
static class |
StackdriverTraceAutoConfiguration.StackdriverTraceHttpAutoconfiguration
Configuration for Sleuth.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
REPORTER_BEAN_NAME
Stackdriver reporter bean name.
|
static String |
SENDER_BEAN_NAME
Stackdriver sender bean name.
|
| Constructor and Description |
|---|
StackdriverTraceAutoConfiguration(GcpProjectIdProvider gcpProjectIdProvider,
com.google.api.gax.core.CredentialsProvider credentialsProvider,
GcpTraceProperties gcpTraceProperties) |
| Modifier and Type | Method and Description |
|---|---|
brave.propagation.Propagation.Factory |
stackdriverPropagation() |
zipkin2.reporter.Reporter<zipkin2.Span> |
stackdriverReporter(zipkin2.reporter.ReporterMetrics reporterMetrics,
GcpTraceProperties trace,
int fallbackZipkinTimeout,
zipkin2.reporter.Sender sender) |
zipkin2.reporter.Sender |
stackdriverSender(GcpTraceProperties traceProperties,
com.google.api.gax.core.ExecutorProvider executorProvider,
io.grpc.ManagedChannel channel) |
io.grpc.ManagedChannel |
stackdriverSenderChannel() |
org.springframework.cloud.sleuth.autoconfig.SleuthProperties |
stackdriverSleuthProperties(org.springframework.cloud.sleuth.autoconfig.SleuthProperties sleuthProperties) |
com.google.api.gax.core.ExecutorProvider |
traceExecutorProvider(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler) |
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler |
traceSenderThreadPool(GcpTraceProperties traceProperties) |
public static final String REPORTER_BEAN_NAME
public static final String SENDER_BEAN_NAME
public StackdriverTraceAutoConfiguration(GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, GcpTraceProperties gcpTraceProperties) throws IOException
IOException@Bean @Primary public org.springframework.cloud.sleuth.autoconfig.SleuthProperties stackdriverSleuthProperties(org.springframework.cloud.sleuth.autoconfig.SleuthProperties sleuthProperties)
@Bean @ConditionalOnMissingBean(name="traceSenderThreadPool") public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler traceSenderThreadPool(GcpTraceProperties traceProperties)
@Bean
@ConditionalOnMissingBean(name="traceExecutorProvider")
public com.google.api.gax.core.ExecutorProvider traceExecutorProvider(@Qualifier(value="traceSenderThreadPool")
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler)
@Bean(destroyMethod="shutdownNow") @ConditionalOnMissingBean(name="stackdriverSenderChannel") public io.grpc.ManagedChannel stackdriverSenderChannel()
@Bean(value="stackdriverReporter")
@ConditionalOnMissingBean(name="stackdriverReporter")
public zipkin2.reporter.Reporter<zipkin2.Span> stackdriverReporter(zipkin2.reporter.ReporterMetrics reporterMetrics,
GcpTraceProperties trace,
@Value(value="${spring.zipkin.messageTimeout:1}")
int fallbackZipkinTimeout,
@Qualifier(value="stackdriverSender")
zipkin2.reporter.Sender sender)
@Bean(value="stackdriverSender") @ConditionalOnMissingBean(name="stackdriverSender") public zipkin2.reporter.Sender stackdriverSender(GcpTraceProperties traceProperties, @Qualifier(value="traceExecutorProvider") com.google.api.gax.core.ExecutorProvider executorProvider, @Qualifier(value="stackdriverSenderChannel") io.grpc.ManagedChannel channel) throws IOException
IOException@Bean @ConditionalOnMissingBean public brave.propagation.Propagation.Factory stackdriverPropagation()
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.