@Configuration(proxyBeanMethods=false) @EnableConfigurationProperties(value=GcpTraceProperties.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.brave.BraveAutoConfiguration.class) public class StackdriverTraceAutoConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StackdriverTraceAutoConfiguration.StackdriverTraceHttpAutoconfiguration
Configuration for Sleuth.
|
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOMIZER_BEAN_NAME
Stackdriver customizer bean name.
|
static String |
REPORTER_BEAN_NAME
Stackdriver reporter bean name.
|
static String |
SENDER_BEAN_NAME
Stackdriver sender bean name.
|
static String |
SPAN_HANDLER_BEAN_NAME
Stackdriver span handler bean name.
|
Constructor and Description |
---|
StackdriverTraceAutoConfiguration(GcpProjectIdProvider gcpProjectIdProvider,
com.google.api.gax.core.CredentialsProvider credentialsProvider,
GcpTraceProperties gcpTraceProperties) |
Modifier and Type | Method and Description |
---|---|
brave.baggage.BaggagePropagation.FactoryBuilder |
baggagePropagationFactoryBuilder() |
void |
closeScheduler() |
zipkin2.reporter.Reporter<zipkin2.Span> |
stackdriverReporter(zipkin2.reporter.ReporterMetrics reporterMetrics,
GcpTraceProperties trace,
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() |
brave.handler.SpanHandler |
stackdriverSpanHandler(zipkin2.reporter.Reporter<zipkin2.Span> stackdriverReporter) |
brave.TracingCustomizer |
stackdriverTracingCustomizer(brave.handler.SpanHandler spanHandler) |
com.google.api.gax.core.ExecutorProvider |
traceExecutorProvider(GcpTraceProperties traceProperties,
Optional<org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler> userProvidedScheduler) |
public static final String REPORTER_BEAN_NAME
public static final String SENDER_BEAN_NAME
public static final String SPAN_HANDLER_BEAN_NAME
public static final String CUSTOMIZER_BEAN_NAME
public StackdriverTraceAutoConfiguration(GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, GcpTraceProperties gcpTraceProperties) throws IOException
IOException
@Bean(value="stackdriverTracingCustomizer") @ConditionalOnMissingBean(name="stackdriverTracingCustomizer") public brave.TracingCustomizer stackdriverTracingCustomizer(@Qualifier(value="stackdriverSpanHandler") brave.handler.SpanHandler spanHandler)
@Bean(value="stackdriverSpanHandler") @ConditionalOnMissingBean(name="stackdriverSpanHandler") public brave.handler.SpanHandler stackdriverSpanHandler(@Qualifier(value="stackdriverReporter") zipkin2.reporter.Reporter<zipkin2.Span> stackdriverReporter)
@Bean @ConditionalOnMissingBean(name="traceExecutorProvider") public com.google.api.gax.core.ExecutorProvider traceExecutorProvider(GcpTraceProperties traceProperties, @Qualifier(value="traceSenderThreadPool") Optional<org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler> userProvidedScheduler)
@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, @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.baggage.BaggagePropagation.FactoryBuilder baggagePropagationFactoryBuilder()
@PreDestroy public void closeScheduler()
Copyright © 2021. All rights reserved.