Skip to content

Conversation

@gsmet
Copy link
Member

@gsmet gsmet commented Nov 4, 2020

If it's a list of classes, they are initialized at build time by
SmallRye Config whereas some of the interceptors (the XRay one for
instance) are initialized at runtime.

Making it a list of strings allows to initialize interceptors at runtime
for native executables.

Fixes #13078

If it's a list of classes, they are initialized at build time by
SmallRye Config whereas some of the interceptors (the XRay one for
instance) are initialized at runtime.

Making it a list of strings allows to initialize interceptors at runtime
for native executables.
@gastaldi gastaldi added this to the 1.10 - master milestone Nov 4, 2020
@gsmet gsmet merged commit d96ce5b into quarkusio:master Nov 4, 2020
@gsmet gsmet modified the milestones: 1.10 - master, 1.9.2.Final Nov 4, 2020
@sherl0cks
Copy link
Contributor

@gsmet FYI I was finally able to test this in 1.9.2.Final. The build works, but tracing no longer works with the quarkus created clients.
Screen Shot 2020-11-06 at 8 09 55 AM

But does work with clients configured using my own CDI producers
Screen Shot 2020-11-06 at 8 09 45 AM

If it helps, here is that config:

    @AlternativePriority(0)
    @ApplicationScoped
    @Produces
    fun dynamoDbAsyncClient(
        @ConfigProperty(name = "aws.region", defaultValue = "us-west-2") awsRegion: String,
        sdkAsyncHttpClient: SdkAsyncHttpClient
    ): DynamoDbAsyncClient {
        return DynamoDbAsyncClient.builder()
            .region(Region.of(awsRegion))
            .httpClient(sdkAsyncHttpClient)
            .overrideConfiguration(
                ClientOverrideConfiguration.builder()
                    // manual instrumentation as described here https://aws.amazon.com/blogs/developer/x-ray-support-for-the-aws-sdk-for-java-v2/
                    .addExecutionInterceptor(TracingInterceptor())
                    .build()
            )
            .build()
    }

I really don't have any idea why this would be, but these are the exact concerns that I had when I wrote #4968 (comment). I'll try to keep testing patches if or @marcinczeczko want to investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

com.amazonaws.xray.interceptors.TracingInterceptor Native Image Failure

3 participants