Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Cloud-Native Applications with Java and Quarkus

You're reading from   Hands-On Cloud-Native Applications with Java and Quarkus Build high performance, Kubernetes-native Java serverless applications

Arrow left icon
Product type Paperback
Published in Dec 2019
Publisher Packt
ISBN-13 9781838821470
Length 314 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Francesco Marchioni Francesco Marchioni
Author Profile Icon Francesco Marchioni
Francesco Marchioni
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: Getting Started with Quarkus FREE CHAPTER
2. Introduction to Quarkus Core Concepts 3. Developing Your First Application with Quarkus 4. Creating a Container Image of Your Application 5. Section 2: Building Applications with Quarkus
6. Adding Web Interfaces to Quarkus Services 7. Managing Data Persistence with Quarkus 8. Building Applications Using the MicroProfile API 9. Securing Applications 10. Section 3: Advanced Development Tactics
11. Advanced Application Development 12. Unifying Imperative and Reactive with Vert.x 13. Reactive Messaging with Quarkus 14. Other Books You May Enjoy

The Eclipse MicroProfile Metrics API

The MicroProfile Metrics specification provides us with a unified way of exporting your services' monitored data to management agents. This helps us perform proactive checks on some key statistics indicators, such as the number of times and the rate at which a service has been requested, the duration of each request, and so on.

Let's get coding. Here, we will focus on the Chapter06/metrics example. First off, in order to use the metrics extension, we have included the following dependency in the pom.xml file:

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>io.quarkus:quarkus-smallrye-metrics</artifactId>
</dependency>

Now, we'll provide an overview of the metrics annotations that have been added on top of our REST service. Let's start with the @Counted annotation, which tracks...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime