When revision 2.3 of the microprofile metrics API was release earlier this year it introduced a new metric type called Simple Timer. Granted, with a name like that it’s easy to underestimate this new type - but don’t get tricked by its unspectacular title. Turns out, most of the time (especially in my projects where we also make use of Prometheus) it’s a way better suited and more flexible metric than i.e. its older cousin Timer.
...
When dealing with JAX-RS resources are normally assembled completely in memory before being put onto the wire for transmission. If the resulting response fits into one single chunk the transmission is accomplished in one go - if the content is bigger than 16kB it will be split into several chunks of that size. You can see the difference in the response headers where a one-go-transmission contains the Content-Length-header (where the server announces the size of the content to be transmitted) while a chunked transmission lacks the Content-Length header but contains a Transfer-Encoding: chunked header.
...
Content Negotiation in JAX-RS allows you to leverage the information in the client requests Accept header to map that request to a specific handler-method within your application. In combination with vendor-specific media types this approach can be used for versioning of an API.
...