JaxRS Async distrubuted tracing not works

Have a Simple test scenario SeriveA:method1 -> SeriveB:method1 -> SeriveA:method2.

**image **

But if I change the call to ServiceB:method1 to async via

client.target("http://localhost:8080/wms/backendapi/serivceB/method1").request().async().get().get();

then the trace look like shown below:
image

So the trace is not propagated

I am using the latest 7.2.0 Stack and apm java agent 1.7.0

We don't have dedicated support for JAX-RS client API, I assume the sync calls are traced due to our instrumentation of HttpUrlConnection (I just saw that Jersey is using it).
Can you verify you are using Jersey, or something else?

I opened an issue for that.
@suikast42 if you could provide details on exactly what you are using, that would be great (eg which servlet container, which JAX-RS client).

I am using JavaEE8 on to of Wildfly 16.

The Rest client is the standard javax.ws.rs.client.Client

hello @suikast42
I failed to reproduce this problem:


I added repositories : service-a, service-b, docker-compose .
And used next dependencies:

<dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.25.1</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <version>2.25.1</version>
        </dependency>

You are trying that with spring.
I tested under wildfly with JavaEE 8 stack.

Did that work with spring?

Yes, it did.
I will try to reproduce this on wildfly.

Hello @suikast42
I failed to reproduce your problem again:
I tested on wildfly 16


added 2 simple projects and deployed to server:
service-b-wildfly
service-a-wildfly

I think the reason why you can't reproduce it is that WildFly comes with it's own JAX-RS implementation which is likely RestEasy.

@felixbarny I replaced dependencies to

    <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-servlet-initializer</artifactId>
            <version>${resteasy.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-client</artifactId>
            <version>${resteasy.version}</version>
            <scope>provided</scope>
        </dependency>

but it didn't helped

@suikast42 can you give a more detailed description on how to reproduce the problem?

Create a simple war project with only Java dependencies.

Then send a request via ClientBuilder.newCliient().target("http://localhost:8080/backendapi/serivceB/method1").request().async().get().get()

Hi @suikast42, can you share it?

I try to extract the problem in a seperate WF war deployment. As soon as possible in my holiday :wink:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

@suikast42 we were not able to reproduce this problem so far.
If you can find out which exact JAX-RS client implementation doesn't work for you, this can be very useful.
Thanks!