suikast42
(Suikast42)
July 9, 2019, 11:17am
1
Have a Simple test scenario SeriveA:method1 -> SeriveB:method1 -> SeriveA:method2.
** **
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:
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>
suikast42
(Suikast42)
July 11, 2019, 6:37pm
6
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
felixbarny
(Felix Barnsteiner)
July 15, 2019, 7:07pm
9
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
felixbarny
(Felix Barnsteiner)
July 16, 2019, 11:37am
11
@suikast42 can you give a more detailed description on how to reproduce the problem?
suikast42
(Suikast42)
July 17, 2019, 8:03am
12
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?
suikast42
(Suikast42)
July 18, 2019, 1:37pm
15
I try to extract the problem in a seperate WF war deployment. As soon as possible in my holiday
system
(system)
Closed
August 8, 2019, 9:37am
16
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
Eyal_Koren
(Eyal Koren)
August 8, 2019, 10:41am
17
@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!