Microservices architecture has many benefits. But it comes at a cost. Running microservices and monitoring what’s going on is tedious. That’s why MicroProfile adopts monitoring as a first-class concept. In this session, learn how MicroProfile runtimes collect metrics and how to seamlessly collect them with tools like Prometheus and Grafana. Learn how MicroProfile makes it easy to connect information about interrelated service calls, how to gather the information and analyze system bottlenecks, how to deploy and scale MicroProfile applications with Kubernetes and how to react to their health status to detect and automatically recover from failures.
4. Rudy De Busscher
• Payara
• Service team
• JSR-375
• Java EE Security API Expert group member
• Committer in Eclipse EE4J groups
• Java EE Believer
@rdebusscher
https://blog.payara.fish/
https://www.atbash.be
5. Observability
• Measure of the internal states of a system
• Monitor system(s)
• Metrics
• Tracing
• Health
• Data on the behaviour of systems
• Proactive
• Automation
• Application Performance Management (APM)
6. Metrics
• Telemetry data
• Gather data and collected centrally for monitoring
• Just collecting data
• No decisions made
• Collect upfront
• Data need to be available when investigation needed
• Start when there are already issues?
• Base line
7. Tracing
• Understanding your application’s behaviour
• Trace single client request
• Details of request flowing though different micro-services
• Debugging purposes
• Finding bottlenecks
8. Health
• Mostly based on metrics
• Kill the server?
• “Treat your servers like cattle not pets”
9. MicroProfile
• MicroProfile can make your Java EE application more MicroService-ish
• Specifications for
• Configuration
• TypeSafe Rest Client
• Security (JWT Auth)
• Metrics
• OpenTracing
• Fault tolerance
• Health
• OpenAPI
• … (more to come)
13. MP Metrics
• Expose metrics with Rest endpoint
• Built on CDI only
• Included in MicroProfile 1.2+
• Automatic instrumentation
• No developer code required
• Integration with other MicroProfile specs
• Like Fault Tolerance
• Custom developer metrics
14. MicroProfile Metrics
• /metrics endpoint
• Prometheus or JSON format
• Different categories
1. System based (default)
2. On events indicated by developer
3. On Fault Tolerance events.
4. Custom defined (business related)
15. • Why Not JMX?
• Polyglot nature of Micro-services
• JMX difficult for non-java systems.
MicroProfile metrics
16. Default MP Metrics
• Required by specification
• System based
• CPU
• Memory - Garbage Collection
• Threads
• Class count
Freepik
1
17. Prometheus
• Open Source
• Started by SoundCloud in 2012
• Now Cloud Native Computing Foundation.
• Multi-dimensional data model with time series
• Query Language
• Pull data
• Alert Manager
29. Take aways
• Get Metrics from your app/‘server’
• Connect to Prometheus
• Show time series with Grafana
• Different types of metrics
• System
• ‘Events’
• From other MP
• Kubernetes
• Keep app healthy
32. Thank You
Not using the Payara Platform yet? Download the open
source software: Payara Server or Payara Micro
https://payara.fish/downloads
Need support for the Payara Platform?
https://payara.fish/support