Red Hat

Eclipse MicroProfile OpenTracing comes to WildFly

Until WildFly 19 you could use Eclipse MicroProfile OpenTracing (MPOT) to trace your application using environment variables relying on the SmallRye OpenTracing implementation. With WildFly 19 you can now configure several Jaeger Tracers to be used in your applications.

Installing Jaeger

Let’s start a jaeger instance using docker :

docker run -d --name jaeger \
  -p 6831:6831/udp \
  -p 5778:5778 \
  -p 14268:14268 \
  -p 16686:16686 \
  jaegertracing/all-in-one:1.16

Now, you can navigate to http://localhost:16686 to access the Jaeger UI.

Configuring the OpenTracing subsystem

You can use either UDP or TCP to send your log spans to Jaeger. Note that those configurations are exclusive, so if you configure a TCP endpoint then Jaeger won’t use the UDP configuration.

Using UDP

First we use the WildFly CLI tool to define an outbound socket binding towards the Jaeger tracer.

[standalone@localhost:9990 /] /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=jaeger:add(host=localhost, port=6831)
{"outcome" => "success"}

Now we can define our MPOT tracer configuration:

[standalone@localhost:9990 /] /subsystem=microprofile-opentracing-smallrye/jaeger-tracer=jaeger-demo:add(sampler-type=const, sampler-param=1, reporter-log-spans=true, sender-binding=jaeger)
{"outcome" => "success"}

Using TCP

If you want to use TCP instead of UDP you need to configure the sender-endpoint and set its value to http://localhost:14268/api/traces.

[standalone@localhost:9990 /] /subsystem=microprofile-opentracing-smallrye/jaeger-tracer=jaeger-demo:write-attribute(name="sender-endpoint", value="http://localhost:14268/api/traces")
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
[standalone@localhost:9990 /] reload

Setting the default tracer

Let’s define this new tracer as the default tracer to be used by WildFly:

[standalone@localhost:9990 /] /subsystem=microprofile-opentracing-smallrye:write-attribute(name=default-tracer, value=jaeger-demo)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
[standalone@localhost:9990 /] reload

Instead of relying on the default tracer attribute, you can use the web.xml deployment descriptor and set the init-parameter smallrye.opentracing.tracer.configuration to the name of the tracer to use.

Deploying a demo application

We provide a sample application at https://github.com/ehsavoie/opentracing-demo. This application is a simple JAXRS endpoint producing XML or JSON and failing randomly.

git clone git@github.com:ehsavoie/opentracing-demo.git
cd opentracing-demo
mvn clean install
cp target/opentracing-demo.war $WILDFLY_HOME/standalone/deployments
$WILDFLY_HOME/bin/standalone.sh

Now, you can navigate to http://localhost:8080/opentracing-demo to access the deployed application. Generate a few traces by clicking on the links several times. Note that in order to demonstrate error traces the application deliberately throws exceptions randomly, so don’t be surprised if some requests fail.

Now open the Jaeger UI and search for traces related to the service opentracing-demo.war, you should see the result of your previous actions.

jaegertraces

WildFly 19 is released!

I’m pleased to announce that the WildFly 19 Final zip is now available for download.

Work on WildFly 19 has been a long and exciting journey, with tremendous help from contributors in the community, a lot of support from the communities behind the components we integrate (particularly the Smallrye folks) and crucial backing from many of my colleagues at Red Hat, particularly all the QE folks who helped make sure all the new goodies really taste good!

So, what are the new goodies?

MicroProfile 3.3

As I’ve discussed in a couple blog posts about the WildFly 19 Beta releases, WildFly 19 supports the Eclipse MicroProfile 3.3 platform specifications. Achieving this has been the main focus of the release.

WildFly now provides support for the following MicroProfile specifications:

Specification Version in WildFly 19

MicroProfile Config

1.4

MicroProfile Fault Tolerance

2.1

MicroProfile Health Check

2.2

MicroProfile JWT Authentication

1.1

MicroProfile Metrics

2.3

MicroProfile OpenAPI

1.1

MicroProfile OpenTracing

1.3

MicroProfile Rest Client

1.4

We also provide all of the MicroProfile specs that are also part of EE 8.

WildFly 19 includes three new subsystems to provide the MicroProfile specs that weren’t in WildFly 18: microprofile-fault-tolerance-smallrye, microprofile-jwt-smallrye and microprofile-openapi-smallrye.

We’ve also added two new standard configuration files to help guide users toward server configurations well suited for microservice use cases:

  • standalone-microprofile.xml

    • Provides our MicroProfile platform implementations combined with JAX-RS and technologies JAX-RS applications commonly use to integrate with external services.

  • standalone-microprofile-ha.xml

    • Similar to standalone-microprofile.xml but with support for high availability web sessions and distributed Hibernate second-level caching.

Our other standard config files (e.g. standalone.xml) also include the subsystems needed to support Config, JWT, Health, Metrics, OpenTracing and Rest Client. The inclusion of JWT is new with WildFly 19.

The WildFly 19 quickstarts also include a number of new quickstarts for MicroProfile. My thanks to everyone who helped with those, particularly Martin Stefanko who did a ton of work.

And finally, we’ve introduced a new wildfly-microprofile maven bom to help Micrapplication developers align with the API artifacts used by WildFly. The maven GAV for this new bom is org.wildfly.bom:wildfly-microprofile:19.0.0.Final. Thanks to Eduardo Martins for this!

Other Enhancements

WildFly 19 brings a number of other enhancements beyond MicroProfile:

  • Elytron configuration on the client side of a Webservices deployment is now supported, so a WS client can support the Elytron security framework available within the application server.

  • A new constant-headers attribute has been added to the HTTP management interface resource definition. Administrators can make use of this attribute to specify additional HTTP headers to be returned in responses to requests made against the HTTP management interface.

  • It is now possible to use TLS 1.3 with WildFly when running against JDK 11 or higher. However, if JDK 11 is in use and if there is a very large number of TLS 1.3 requests being made, it is possible that a drop in performance (throughput and response time) will occur compared to TLS 1.2. Upgrading to newer JDK versions should improve performance. For this reason, the use of TLS 1.3 is currently disabled by default. TLS 1.3 can be enabled by configuring the new cipher-suite-names attribute in the SSL Context resource definition in the Elytron subsystem. It is recommended to test for performance degradation prior to enabling TLS 1.3 in a production environment.

  • RESTEasy context parameters and providers can now be configured via attributes in the jaxrs subsystem configuration.

  • Expression resolution in EE security manager deployment descriptors (permissions.xml and jboss-permissions.xml) is now supported. You can now use the familiar ${foo:true} syntax in these deployment descriptors to allow customization of settings at runtime.

  • A JBoss Modules module can be made globally available to all deployments by simply copying one or more library artifacts or other resources to a directory and then configuring the WildFly ee subsystem with the location of that directory.

  • Executor / thread pool statistics are now available for the EE Concurrency resources.

Jakarta EE and Java EE

WildFly 19.0.0 is a Jakarta EE 8 compatible implementation, with both the Full Platform and the Web Profile. Evidence supporting our certification is available for the Full Platform and for the Web Profile.

WildFly 19 is also a certified compatible implementation of Java EE 8.

JDK Support

For the last couple of years we’ve worked to ensure our releases run well for most developer use cases on the most recent GA JDK version available on the WildFly final release date. Unfortunately, that has come to an end with WildFly 19 and the just-released JDK 14. We haven’t had time to digest some of the package removals in JDK 14, particularly in the security area.

While we do like to run well on more recent JDKs, our recommendation is that you run WildFly on the most recent long-term support release, i.e. on JDK 11 for WildFly 19. We do considerably more testing of WildFly itself on the LTS JDKs, and we make no attempt to ensure the projects producing the various libraries we integrate are testing their libraries on anything other than JDK 8 or 11.

WildFly 19 also is heavily tested and runs well on Java 8. We plan to continue to support Java 8 at least through WildFly 21, and probably beyond.

Please note that WildFly runs on Java 11 and later in classpath mode.

At this point it is uncertain when we’ll be able to say that a release of WildFly runs well on JDK 14 or later. We’ll have to see how well the work for that, both in WildFly itself and in the projects we integrate, aligns with our other goals. I don’t expect it to be a priority before WildFly 22.

Management API Documentation

Since the JBoss AS 7.1.1 release we’ve published auto-generated documentation of the appserver management API at the wildscribe.github.io site. Starting with WildFly 19 we’ve stopped publishing there and instead we will be including the management API documentation as part of the overall documentation for the release. The content is equivalent; we’ve just changed where it is located.

Jira Release Notes

The full list of issues resolved is available here. Issues resolved in the WildFly Core 11 releases included with WildFly 19 are available here.

User Forum Move

Finally, a quick reminder that we have moved the WildFly user forum from the developer.jboss.org site to google groups. That’s a great place to provide feedback on or ask questions about WildFly 19.

Enjoy, but more importantly, stay safe and stay well!

back to top