opentelemetry-java-instrume.../instrumentation/jaxws
pellmont 5db149e1fa
fix order of cxf handlers to enable symmetric tracing around jaxws handler chain (#8160)
the current implementation of Start and End around the invocation of a
Jax WS is asymmetric around the JAX-WS Handler Chain.

Current behavior:
(execution of incoming MessageHandlers) -> (TracingStartInInterceptor)
-> (WebService Invocation) -> (execution of outgoing MessageHandlers) ->
(TracingEndInInterceptor)

if I understood the code of this cxf instrumentation correctly, the
intent was to build the span close around the WebService Invocation
(without Handler Chains).

So the desired behavior would look like this:
(execution of incoming MessageHandlers) -> (TracingStartInInterceptor)
-> (WebService Invocation) -> (TracingEndInInterceptor) -> (execution of
outgoing MessageHandlers)

Unfortunately CXF is calling the Outgoing Chain inside the POST_INVOKE
Phase of Cxf (so the outgoing chain is technically a sub-chain in the
incoming chain... which is documented but quite surprising...).

So the solution in the fix at least guarantees the the outgoing chain is
invoked AFTER end of tracing. For any extra Interceptors in the
POST_INVOKE Phase there is still no guarantee of ordering, but I think
this is not a opentelemetry issue but a design-flaw of CXF...

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-03 13:06:51 +03:00
..
jaxws-2.0/javaagent InstrumentationConfig part 2 (#6292) 2022-07-11 09:47:19 +02:00
jaxws-2.0-arquillian-testing JUnit5 parameterized tests don't work correctly with arquillian (#5833) 2022-04-14 12:15:55 -07:00
jaxws-2.0-axis2-1.6/javaagent Update gradle to 7.5.1 (#6359) 2022-08-12 12:03:43 +02:00
jaxws-2.0-common-testing End groovy files with newline (#7127) 2022-11-10 12:21:55 +01:00
jaxws-2.0-cxf-3.0 fix order of cxf handlers to enable symmetric tracing around jaxws handler chain (#8160) 2023-04-03 13:06:51 +03:00
jaxws-2.0-metro-2.2/javaagent Update gradle to 7.5.1 (#6359) 2022-08-12 12:03:43 +02:00
jaxws-2.0-tomee-testing Disable YodaCondition check and revert some of the changes (#7596) 2023-01-17 19:44:15 -08:00
jaxws-2.0-wildfly-testing Disable YodaCondition check and revert some of the changes (#7596) 2023-01-17 19:44:15 -08:00
jaxws-common/javaagent Rename all methods in all Getters to use the `get*()` naming scheme (#7619) 2023-01-23 09:28:11 +00:00
jaxws-jws-api-1.1/javaagent Fix some instrumentation scope names (#7632) 2023-01-23 19:46:06 -08:00