@Factory
@Requires(classes=zipkin2.reporter.stackdriver.StackdriverSender.class) @Requires(property="gcp.tracing.enabled",value="true",defaultValue="true")
public class StackdriverSenderFactory
extends java.lang.Object
StackdriverSender
for Micronaut if present on the classpath.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_ENABLED
The property used to enable tracing.
|
static java.net.URI |
TRACE_SCOPE
The trace scope to use.
|
static java.lang.String |
TRACE_TARGET
The trace target to use.
|
Constructor and Description |
---|
StackdriverSenderFactory() |
Modifier and Type | Method and Description |
---|---|
protected io.micronaut.context.event.BeanCreatedEventListener<io.micronaut.tracing.brave.BraveTracerConfiguration> |
braveTracerConfigurationBeanCreatedEventListener()
A
BeanCreatedEventListener that modifies the brave trace configuration for Stackdriver compatibility. |
protected brave.propagation.Propagation.Factory |
stackdriverPropagation()
The
StackdriverTracePropagation.FACTORY as a bean. |
zipkin2.reporter.AsyncReporter<zipkin2.Span> |
stackdriverReporter(io.micronaut.tracing.brave.AsyncReporterConfiguration configuration)
A custom
AsyncReporter that uses StackdriverEncoder.V2 . |
protected zipkin2.reporter.Sender |
stackdriverSender(GoogleCloudConfiguration cloudConfiguration,
com.google.auth.oauth2.GoogleCredentials credentials,
io.grpc.ManagedChannel channel)
The
StackdriverSender bean. |
protected io.grpc.ManagedChannel |
stackdriverTraceSenderChannel() |
public static final java.net.URI TRACE_SCOPE
public static final java.lang.String TRACE_TARGET
public static final java.lang.String PROPERTY_ENABLED
@Singleton @Bean(preDestroy="shutdownNow") @Named(value="stackdriverTraceSenderChannel") @Nonnull protected io.grpc.ManagedChannel stackdriverTraceSenderChannel()
@RequiresGoogleProjectId @Requires(classes=zipkin2.reporter.stackdriver.StackdriverSender.class) @Singleton @Nonnull protected zipkin2.reporter.Sender stackdriverSender(@Nonnull GoogleCloudConfiguration cloudConfiguration, @Nonnull com.google.auth.oauth2.GoogleCredentials credentials, @Nonnull @Named(value="stackdriverTraceSenderChannel") io.grpc.ManagedChannel channel)
StackdriverSender
bean.cloudConfiguration
- The google cloud configurationcredentials
- The credentialschannel
- The channel to use@Singleton @Requires(classes=zipkin2.reporter.stackdriver.StackdriverSender.class) @Nonnull protected io.micronaut.context.event.BeanCreatedEventListener<io.micronaut.tracing.brave.BraveTracerConfiguration> braveTracerConfigurationBeanCreatedEventListener()
BeanCreatedEventListener
that modifies the brave trace configuration for Stackdriver compatibility.BeanCreatedEventListener
@Singleton @Requires(beans=zipkin2.reporter.stackdriver.StackdriverSender.class) protected brave.propagation.Propagation.Factory stackdriverPropagation()
StackdriverTracePropagation.FACTORY
as a bean.@Singleton @Requires(classes=zipkin2.reporter.stackdriver.StackdriverSender.class) @Requires(beans=io.micronaut.tracing.brave.AsyncReporterConfiguration.class) public zipkin2.reporter.AsyncReporter<zipkin2.Span> stackdriverReporter(@Nonnull io.micronaut.tracing.brave.AsyncReporterConfiguration configuration)
AsyncReporter
that uses StackdriverEncoder.V2
.configuration
- The configuration