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.reporter.BytesEncoder<brave.handler.MutableSpan>
zipkin2.reporter.BytesMessageSender
stackdriverSender
(GcpTraceProperties traceProperties, com.google.api.gax.core.ExecutorProvider executorProvider, io.grpc.ManagedChannel channel) io.grpc.ManagedChannel
brave.handler.SpanHandler
stackdriverSpanHandler
(zipkin2.reporter.BytesMessageSender sender, zipkin2.reporter.BytesEncoder<brave.handler.MutableSpan> encoder, zipkin2.reporter.ReporterMetrics reporterMetrics, GcpTraceProperties trace) 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
-
ENCODER_BEAN_NAME
Stackdriver encoder 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("stackdriverSender") zipkin2.reporter.BytesMessageSender sender, @Qualifier("stackdriverEncoder") zipkin2.reporter.BytesEncoder<brave.handler.MutableSpan> encoder, zipkin2.reporter.ReporterMetrics reporterMetrics, GcpTraceProperties trace) -
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() -
stackdriverSender
@Bean("stackdriverSender") @ConditionalOnMissingBean(name="stackdriverSender") public zipkin2.reporter.BytesMessageSender 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("stackdriverEncoder") @ConditionalOnMissingBean(name="stackdriverEncoder") public zipkin2.reporter.BytesEncoder<brave.handler.MutableSpan> spanBytesEncoder() -
closeScheduler
@PreDestroy public void closeScheduler()
-