Class StackdriverTraceAutoConfiguration
java.lang.Object
com.google.cloud.spring.autoconfigure.trace.StackdriverTraceAutoConfiguration
@AutoConfiguration
@EnableConfigurationProperties(GcpTraceProperties.class)
@ConditionalOnProperty(value="spring.cloud.gcp.trace.enabled",
matchIfMissing=true)
@ConditionalOnClass(zipkin2.reporter.stackdriver.StackdriverSender.class)
@AutoConfigureBefore({org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration.class,org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration.class})
public class StackdriverTraceAutoConfiguration
extends Object
Config for Stackdriver Trace.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStackdriverTraceAutoConfiguration
(GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, GcpTraceProperties gcpTraceProperties) -
Method Summary
Modifier and TypeMethodDescriptionbrave.baggage.BaggagePropagation.FactoryBuilder
void
zipkin2.codec.BytesEncoder<zipkin2.Span>
zipkin2.reporter.AsyncReporter<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
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)
-
Field Details
-
REPORTER_BEAN_NAME
Stackdriver reporter bean name. Name of the bean matters for supporting multiple tracing systems.- See Also:
-
SENDER_BEAN_NAME
Stackdriver sender bean name. Name of the bean matters for supporting multiple tracing systems.- See Also:
-
SPAN_HANDLER_BEAN_NAME
Stackdriver span handler bean name. Name of the bean matters for supporting multiple tracing systems.- See Also:
-
CUSTOMIZER_BEAN_NAME
Stackdriver customizer bean name. Name of the bean matters for supporting multiple tracing systems.- See Also:
-
-
Constructor Details
-
StackdriverTraceAutoConfiguration
public StackdriverTraceAutoConfiguration(GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, GcpTraceProperties gcpTraceProperties) throws IOException - Throws:
IOException
-
-
Method Details
-
stackdriverTracingCustomizer
@Bean("stackdriverTracingCustomizer") @ConditionalOnMissingBean(name="stackdriverTracingCustomizer") public brave.TracingCustomizer stackdriverTracingCustomizer(@Qualifier("stackdriverSpanHandler") brave.handler.SpanHandler spanHandler) -
stackdriverSpanHandler
@Bean("stackdriverSpanHandler") @ConditionalOnMissingBean(name="stackdriverSpanHandler") public brave.handler.SpanHandler stackdriverSpanHandler(@Qualifier("stackdriverReporter") zipkin2.reporter.Reporter<zipkin2.Span> stackdriverReporter) -
traceExecutorProvider
@Bean @ConditionalOnMissingBean(name="traceExecutorProvider") public com.google.api.gax.core.ExecutorProvider traceExecutorProvider(GcpTraceProperties traceProperties, @Qualifier("traceSenderThreadPool") Optional<org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler> userProvidedScheduler) -
stackdriverSenderChannel
@Bean(destroyMethod="shutdownNow") @ConditionalOnMissingBean(name="stackdriverSenderChannel") public io.grpc.ManagedChannel stackdriverSenderChannel() -
stackdriverReporter
@Bean("stackdriverReporter") @ConditionalOnMissingBean(name="stackdriverReporter") public zipkin2.reporter.AsyncReporter<zipkin2.Span> stackdriverReporter(zipkin2.reporter.ReporterMetrics reporterMetrics, GcpTraceProperties trace, @Qualifier("stackdriverSender") zipkin2.reporter.Sender sender) -
stackdriverSender
@Bean("stackdriverSender") @ConditionalOnMissingBean(name="stackdriverSender") public zipkin2.reporter.Sender stackdriverSender(GcpTraceProperties traceProperties, @Qualifier("traceExecutorProvider") com.google.api.gax.core.ExecutorProvider executorProvider, @Qualifier("stackdriverSenderChannel") io.grpc.ManagedChannel channel) throws IOException - Throws:
IOException
-
baggagePropagationFactoryBuilder
@Bean @ConditionalOnMissingBean public brave.baggage.BaggagePropagation.FactoryBuilder baggagePropagationFactoryBuilder() -
spanBytesEncoder
@Bean @ConditionalOnMissingBean public zipkin2.codec.BytesEncoder<zipkin2.Span> spanBytesEncoder() -
closeScheduler
@PreDestroy public void closeScheduler()
-