Opentracing extension in WFLY - EAR + Weld Probe

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Opentracing extension in WFLY - EAR + Weld Probe

Matej Novotny
Hello,

during recent Weld release a noticed that one of Weld examples stopped working on WFLY 14.
It is an EAR (WAR + EJB JAR) that has no special stuff in it and the error shows a CNFE from open tracing[1] upon deployment.

After some digging I realized that we also have Weld Probe (devel tool) on which basically intercepts every bean out there to give you some stats about deployment.
That means it will try to create an interceptor from TracerProducer[2] as well and will fail because:
1) the module (opentracing module) has no dependencies on Weld hence cannot load proxies and will delegate this to EAR root ClassLoader[3]
 - if the module's module.xml has weld-core, this won't fail (but we don't want to dependend on core, that's nasty)
2) EAR root CL doesn't know about opentracing API, hence the CNFE
 - adding some dependencies there would solve it, we do that for WARs already

Looking at opentracing extension, why are there no dependencies added to the root of EAR[4]?
For the record I did try removing that 'if' statement and then executing test[5] related to the PR in which it was added and it passed (and solved my deployment problem as well).
If the above approach is fine, I can create JIRA and send a PR, I just wanted to check with someone who has more knowledge about that opentracing extension than I do.

Regards
Matej
_______________________________________________________________________________________________________________________
[1] https://issues.jboss.org/browse/WELD-2549
[2] https://github.com/wildfly/wildfly/blob/master/microprofile/opentracing-smallrye/src/main/java/org/wildfly/microprofile/opentracing/smallrye/TracerProducer.java
[3] https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/main/java/org/jboss/as/weld/services/bootstrap/ProxyServicesImpl.java#L83
[4] https://github.com/wildfly/wildfly/blob/master/microprofile/opentracing-extension/src/main/java/org/wildfly/extension/microprofile/opentracing/TracingDependencyProcessor.java#L57-L59
[5] https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/microprofile/opentracing/EarOpenTracingTestCase.java
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Opentracing extension in WFLY - EAR + Weld Probe

Matej Novotny
Thanks for your response.
I'll send a PR soon as I can get to it.

Matej

----- Original Message -----

> From: "Juraci Paixão Kröhling" <[hidden email]>
> To: "Matej Novotny" <[hidden email]>, "WildFly Dev" <[hidden email]>
> Cc: "Martin Kouba" <[hidden email]>, "Nikoleta Ziakova" <[hidden email]>
> Sent: Thursday, November 29, 2018 1:52:03 PM
> Subject: Re: Opentracing extension in WFLY - EAR + Weld Probe
>
> On 11/28/18 1:31 PM, Matej Novotny wrote:
> > during recent Weld release a noticed that one of Weld examples stopped
> > working on WFLY 14.
>
> WF14 shipped with a bug that prevented the subsystem from working properly:
> https://issues.jboss.org/browse/WFLY-10961
>
> I don't think it affects your examples, though.
>
> > Looking at opentracing extension, why are there no dependencies added to
> > the root of EAR[4]?
> > For the record I did try removing that 'if' statement and then executing
> > test[5] related to the PR in which it was added and it passed (and solved
> > my deployment problem as well).
> > If the above approach is fine, I can create JIRA and send a PR, I just
> > wanted to check with someone who has more knowledge about that opentracing
> > extension than I do.
>
> I trust your judgment on how it should look like. As long as the tests
> are passing, I'd say that it's OK to change.
>
> IIRC, we needed this conditional statement because we need each
> subdeployment to have its own tracer instance. If you are saying that we
> can get this scenario without that conditional, please do change it :)
>
> - Juca.
>

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev