Class SdkClientBuilderListener
java.lang.Object
io.micronaut.tracing.opentelemetry.xray.SdkClientBuilderListener
- All Implemented Interfaces:
io.micronaut.context.event.BeanCreatedEventListener<software.amazon.awssdk.core.client.builder.SdkClientBuilder<?,
,?>> EventListener
@Internal
@Requires(classes={io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkTelemetry.class,software.amazon.awssdk.core.client.builder.SdkClientBuilder.class})
@Singleton
public class SdkClientBuilderListener
extends Object
implements io.micronaut.context.event.BeanCreatedEventListener<software.amazon.awssdk.core.client.builder.SdkClientBuilder<?,?>>
Configures a Tracing Interceptor for all sdk client builders.
- Since:
- 4.2.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorDescriptionSdkClientBuilderListener
(io.micronaut.context.BeanProvider<io.opentelemetry.api.OpenTelemetry> openTelemetry) -
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.core.client.builder.SdkClientBuilder<?,
?> onCreated
(io.micronaut.context.event.BeanCreatedEvent<software.amazon.awssdk.core.client.builder.SdkClientBuilder<?, ?>> event) Add an OpenTelemetry execution interceptor toSdkClientBuilder
.
-
Constructor Details
-
SdkClientBuilderListener
public SdkClientBuilderListener(io.micronaut.context.BeanProvider<io.opentelemetry.api.OpenTelemetry> openTelemetry) - Parameters:
openTelemetry
- OpenTelemetry
-
-
Method Details
-
onCreated
public software.amazon.awssdk.core.client.builder.SdkClientBuilder<?,?> onCreated(io.micronaut.context.event.BeanCreatedEvent<software.amazon.awssdk.core.client.builder.SdkClientBuilder<?, ?>> event) Add an OpenTelemetry execution interceptor toSdkClientBuilder
.- Specified by:
onCreated
in interfaceio.micronaut.context.event.BeanCreatedEventListener<software.amazon.awssdk.core.client.builder.SdkClientBuilder<?,
?>> - Parameters:
event
- bean created event- Returns:
- sdk client builder
-