Payara Platform 5.191 – MicroProfile 2.1

Cloud & Microservices

The 5.191 Payara Platform release brought with it support for MicroProfile 2.1. For those who don’t know, the only specification updated in this version of MicroProfile was OpenTracing, going from 1.1 to 1.2.

Skip Patterns

A feature utilising MicroProfile Config, you can now skip tracing on JAX-RS endpoints by providing standard Java Regex patterns. You can even specify multiple patterns to make sure you catch all of the methods you need to skip tracing for, using the vertical bar / pipe symbol acting as the splitter between the individual patterns:

 

mp.opentracing.server.skip-pattern=/pretty|/please.*|/skip/me/kthxbai

Operation Name Providers

Operation Name Providers refers to the new option to select one of two formats for the automatic generation of a trace’s operation name. You have two options: http-path, or class-method (the latter being the default and the format the auto-generated names followed pre 1.2).

Given the following JAX-RS endpoint…

package fish.payara.doctorwho.memes
@Path("/wibbly")
public class Blink {
    ...
    @GET
    @Path("/wobbly")
    public String getTimeyWimey {
        ...
    }
    ...
}

… the two operation name providers would produce the following operation names respectively:

 

GET:/wibbly/wobbly
GET:fish.payara.doctorwho.memes.Blink.getTimeyWimey

MicroProfile Endpoints No Longer Traced

A convenience feature so that you don’t have to specify the skip patterns yourself, the endpoints provided by other MicroProfile specifications (e.g. /health) will no longer be traced, helping to keep the noisiness of the tracing down.

 

Extra Exception Logging

Exceptions thrown when executing a method annotated with @Traced is now added to traces, providing you with extra detail about any additional methods that you’re tracing if they fail. Previously, only exceptions thrown by inbound and outbound requests to JAX-RS methods were logged, so this is simply an extension of that pre-existing feature.

 

MicroProfile OpenTracing 1.3: Rest Client Integration

Although not strictly compliant due to us not yet supporting MicroProfile Rest Client 1.2, we went ahead and implemented MicroProfile OpenTracing 1.3 which adds instrumentation to the type-safe Rest clients from another Microprofile spec. Although the specification for OpenTracing 1.3 is explicitly targetted at Rest Client 1.2, it was determined that the OpenTracing specification doesn’t actually rely on any APIs introduced specifically between Rest Client 1.1 and 1.2. This allows us to instrument the clients created from our current 1.1 Rest Client implementation for your tracing pleasure. The tracing for these clients is much the same as for “normal” Rest clients, but full details can be found here for reference.

 

Download the latest version of Payara Server or Payara Micro:

 

{{cta(‘4c7626f5-1e53-418e-90c8-add6e4af19c9′,’justifycenter’)}}

 

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Cut Jakarta EE Startup Times from Seconds to Milliseconds with CRaC 8 minutes
Jakarta EE

Cut Jakarta EE Startup Times from Seconds to Milliseconds with CRaC 

Jakarta EE applications can take anywhere from several seconds to over a minute to start, depending on their size […]

Stacked copies of the Payara developer guide “Zero Trust Architecture with Jakarta EE and MicroProfile” on an orange background, showing the dark blue cover design with the Payara logo and a laptop illustration featuring a shield and padlock icon. 4 minutes
Jakarta EE

Implementing Zero Trust Security with Jakarta EE: A Practical Guide

Zero Trust security has moved from buzzword to necessity. The principle is simple: never trust, always verify. But implementing […]

Application Modernization 7 minutes
Thought Leadership

8 Key Benefits of Application Modernization for Business Growth

Modernizing enterprise applications is a strategic imperative for organizations that want to remain competitive and resilient. According to our […]