Use Eclipse MicroProfile Metrics feature to track usage metrics
Use Prometheus to scrape app metrics and Grafana for analytics and monitoring
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.
- Create Kubernetes service in IBM Cloud.
- Deploy all the microservices into the Kubernetes cluster.
- Deploy Prometheus server as a service into the Kubernetes cluster.
- Deploy Grafana as a service into the Kubernetes cluster.
- Use ingress gateway to expose web application from the Kubernetes cluster.
- User accesses the web app through browser.
Ready to get started? Check out the detailed instructions in the README.