WF-SWARM creates two serialize spans instead of one
kevinearls opened this issue · 10 comments
Using this project: https://github.com/kevinearls/SimpleSwarmWithTracing prior to Jaeger 0.21.0/opentracing-jaxrs 0.0.10 hitting localhost:8080/hello would create a trace with 2 spans as expected.
After updating to those version I get 4 spans, 2 of which have operationName serialize. (See https://gist.github.com/kevinearls/9941f35584ae8acd59b64f33ef36f0cc for details.)
If this is not the expected behavior, it should at least be documented.
This is weird, there is a test for it which works as expected https://github.com/opentracing-contrib/java-jaxrs/blob/master/opentracing-jaxrs2-itest/common/src/main/java/io/opentracing/contrib/jaxrs2/itest/common/AbstractServerTest.java#L266
@kevinearls I have cloned your repo and checked out older version (c01b892
) which uses jaeger 0.21.0 and 0.0.10 version of this lib and there are also 4 spans!
There should be only one serialize
span but this issue seems to be related to Swarm runtime.
@pavolloffay correct, the original version used jaeger 0.20.5 and 0.0.8 of the opentracing-jaxrs library. Once I upgraded to 0.21.0/0.0.10 I started getting the serialize spans.
Note that serialization tracing can be disabled by custom configuration.
I will keep it open for swarm as there are 2 serialization spans.
@kenfinnigan do you know why JAX-RS serialization
filters are called twice in Swarm?
Without delving into it I don't have an answer unfortunately
@pavolloffay I do not think this is specific to Swarm. I saw this behavior yesterday with WildFly 11.1.0 when running some integration tests using Jaeger all-in-one image v1.4.1.
@pavolloffay could you describe how to disable serialization in configuration please? Or where I can find some documentation for this besides https://github.com/opentracing-contrib/java-jaxrs#custom-configuration ? thanks
@lubo3 set https://github.com/opentracing-contrib/java-jaxrs/blob/master/opentracing-jaxrs2/src/main/java/io/opentracing/contrib/jaxrs2/server/ServerTracingDynamicFeature.java#L193 to false for the server side serialization. On the client side do the same but with client feature builder
The second interceptor gets registered from ClientTracingFeature
. We should remove provider annotation for that class. I am in favor of disabling auto registration completely.