Win $20,000. Help build the future of education. Answer the call. Learn more

Use Eclipse MicroProfile Metrics feature to track usage metrics


This developer code pattern demonstrates the deployment of a Java Open Liberty application using Eclipse MicroProfile on Kubernetes. It uses Prometheus to scrape application metrics and Grafana platform for analytics and monitoring.


Eclipse MicroProfile is a baseline platform definition that optimizes Enterprise Java™ for a microservices architecture and delivers application portability across multiple MicroProfile runtimes. Since the release of Eclipse MicroProfile 1.2, the metrics feature comes out of the box with the platform. Eclipse MicroProfile Metrics provides a way to register application-specific metrics to allow applications to expose metrics in the application scope.

The sample application used is a web app for managing a conference and is based on discrete microservices. The front end is written in Angular; the backing microservices are in the Java programming language. All run on Open Liberty, in Docker containers managed by Kubernetes. It’s based on a demo application from the Eclipse MicroProfile platform team. The fork sample application was converted to use Open Liberty and Eclipse Microprofile Metrics, which is part of Eclipse Microprofile 1.2.



  1. Create Kubernetes service in IBM Cloud.
  2. Deploy all the microservices into the Kubernetes cluster.
  3. Deploy Prometheus server as a service into the Kubernetes cluster.
  4. Deploy Grafana as a service into the Kubernetes cluster.
  5. Use ingress gateway to expose web application from the Kubernetes cluster.
  6. User accesses the web app through browser.


Ready to get started? Check out the detailed instructions in the README.