SlideShare a Scribd company logo
Deploy, monitor, and take control of
your micro-services with MicroProfile
• How do you monitor this?
• Observability
Octo Blog
What You’ll Learn Today
• Metrics Background
• MicroProfile: Metrics - Fault Tolerance
• Application Metrics - Prometheus - Grafana
Rudy De Busscher
• Payara
• Service team
• JSR-375
• MicroProfile committer
• Committer in Eclipse EE4J groups - Jakarta EE
• Java EE Security API Expert group member
@rdebusscher
https://blog.payara.fish/
https://www.atbash.be
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)
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
Tracing
• Understanding your application’s behaviour
• Trace single client request
• Details of request flowing though different micro-services
• Debugging purposes
• Finding bottlenecks
• Monitoring
Health
• Mostly based on metrics
• Kill the server?
• “Treat your servers like cattle not pets”
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
• …
Test system
Payara

Server
Prometheus Grafana
Time series DB
Graphics

Dashboards
Expose metrics
Using Docker containers
Setup demo environment
• Creating containers
• Connecting them together
• ‘service’ simulation
• Create load through ‘bad’ parallel Prime values calculation.
Demo
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
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)
• Why Not JMX?
• Polyglot nature of Micro-services
• JMX difficult for non-java systems.
MicroProfile metrics
Default MP Metrics
• Required by specification
• System based
• CPU
• Memory - Garbage Collection
• Threads
• Class count
Freepik
1
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
Prometheus alternatives
• Graphite
• Need to push metrics to it
• Influx DB
• Needs rest of stack (Telegraf - Chronograf - Capacitor)
Grafana
• Open Source tool for visualization
• query, visualize, alert on
• For time series
• Kibana
• Recent improved support for time-series
• Works only on top of ElasticSearch
Grafana alternatives
On events
• Invocation Count
• @Counted
• Execution time information
• @Timed
• @Metered
• More detailed information with Tracing
Freepik
2
Fault Tolerance
• Number of retries
• @Retry
• @CircuitBreaker
• Open, Half-Open, Closed
• @BulkHead
• Accepted, Rejected
• @Callback
• # calls
Freepik
3
Control and monitor_microservices_with_microprofile
Developer defined
• Custom defined values
• @Gauge
• On field or getter
• If business value, store them somewhere
Freepik
4
Kubernetes
• Orchestration
• Docker-compose
• Ideal for smaller ‘installations’
• Open-Source Platform to Manage containers
• Not only docker containers
• Core tasks
• Deployment
• Scale
• Monitoring
Control and monitor_microservices_with_microprofile
Kubernetes Monitoring
• Metrics
• Metrics for k8s processes/actions
• Metrics-server
• Scaling
• Horizontal Pod scaling (kubectl autoscale )
• Monitoring
• Restart pods
• Keep system ‘healthy'
K8s monitoring
• Demo
• Kill server
• Automatic recovering
Demo
K8s monitoring
• K8S
• Kill server/container/pod
• Automatic recovering
• Prometheus within k8s
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
Code
• MicroProfile
• https://microprofile.io
• Demo code
• https://github.com/rdebusscher/mp-metrics-demo
Q & A
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

More Related Content

PDF
Transactions in micro-services (fall 2019)
PDF
Monitor Micro-service with MicroProfile metrics
PPTX
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
PDF
Advanced queries on the Infinispan Data Grid
PDF
URP? Excuse You! The Three Metrics You Have to Know
PDF
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
PPTX
Hands-on Performance Tuning Lab - Devoxx Poland
PDF
Effective cloud-ready apps with MicroProfile
Transactions in micro-services (fall 2019)
Monitor Micro-service with MicroProfile metrics
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
Advanced queries on the Infinispan Data Grid
URP? Excuse You! The Three Metrics You Have to Know
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
Hands-on Performance Tuning Lab - Devoxx Poland
Effective cloud-ready apps with MicroProfile

What's hot (19)

PPTX
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
PDF
Secure JAX-RS
PPTX
Lightbend Training for Scala, Akka, Play Framework and Apache Spark
PPTX
Monitoring Oracle SOA Suite
PPT
Sneaking Scala through the Back Door
PPTX
Debugging Microservices - key challenges and techniques - Microservices Odesa...
PDF
Machine Learning At Speed: Operationalizing ML For Real-Time Data Streams
PPTX
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
PDF
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
PDF
Making Scala Faster: 3 Expert Tips For Busy Development Teams
PPTX
Monitoring Oracle SOA Suite - UKOUG Tech15 2015
PDF
Apache Kafka® Delivers a Single Source of Truth for The New York Times
PDF
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
PPTX
Microservices and Integration: what's next with Istio service mesh
PDF
Akka at Enterprise Scale: Performance Tuning Distributed Applications
PDF
Gradual migration to MicroProfile
PDF
Introduction to Micronaut - JBCNConf 2019
PPTX
Distributed tracing 101
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
Secure JAX-RS
Lightbend Training for Scala, Akka, Play Framework and Apache Spark
Monitoring Oracle SOA Suite
Sneaking Scala through the Back Door
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Machine Learning At Speed: Operationalizing ML For Real-Time Data Streams
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
Making Scala Faster: 3 Expert Tips For Busy Development Teams
Monitoring Oracle SOA Suite - UKOUG Tech15 2015
Apache Kafka® Delivers a Single Source of Truth for The New York Times
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
Microservices and Integration: what's next with Istio service mesh
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Gradual migration to MicroProfile
Introduction to Micronaut - JBCNConf 2019
Distributed tracing 101
Ad

Similar to Control and monitor_microservices_with_microprofile (20)

PDF
Monitor Microservices with MicroProfile Metrics
PPTX
Implementation_Big_Data_Presentation.pptx
PPTX
Cloud patterns at Carleton University
PPTX
ThroughTheLookingGlass_EffectiveObservability.pptx
PPTX
Cloud Design Patterns - Hong Kong Codeaholics
PPTX
ADDO Open Source Observability Tools
PDF
DataEngConf SF16 - Scalable and Reliable Logging at Pinterest
PDF
Scalable and Reliable Logging at Pinterest
PPTX
8 cloud design patterns you ought to know - Update Conference 2018
PDF
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
PDF
TTPs for Threat hunting In Oil Refineries
PDF
Building an Experimentation Platform in Clojure
PDF
Internals of Presto Service
PDF
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
PPTX
Providence: rapid vulnerability prevention
PDF
Monitoring MySQL at scale
PPTX
From Pilot to Product - Morning@Lohika
PDF
Azure Application insights - An Introduction
PPTX
Meetup on Apache Zookeeper
PPTX
Hands-on Performance Workshop - The science of performance
Monitor Microservices with MicroProfile Metrics
Implementation_Big_Data_Presentation.pptx
Cloud patterns at Carleton University
ThroughTheLookingGlass_EffectiveObservability.pptx
Cloud Design Patterns - Hong Kong Codeaholics
ADDO Open Source Observability Tools
DataEngConf SF16 - Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at Pinterest
8 cloud design patterns you ought to know - Update Conference 2018
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
TTPs for Threat hunting In Oil Refineries
Building an Experimentation Platform in Clojure
Internals of Presto Service
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
Providence: rapid vulnerability prevention
Monitoring MySQL at scale
From Pilot to Product - Morning@Lohika
Azure Application insights - An Introduction
Meetup on Apache Zookeeper
Hands-on Performance Workshop - The science of performance
Ad

More from Rudy De Busscher (15)

PDF
jakarta-integration-testing.pdf
PDF
core-profile_jakartaOne2022.pdf
PDF
MicroStream-WithoutDatabase.pdf
PDF
Jakarta EE 8 on JDK17
PDF
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
PDF
Creating a Kubernetes Operator in Java
PDF
Finally, easy integration testing with Testcontainers
PDF
Transactions in micro-services (summer 2019)
PDF
Secure JAX-RS
PDF
From Monolith to micro-services and back : The Self Contained Systems
PDF
Java EE Security API - JSR375: Getting Started
PDF
What is tackled in the Java EE Security API (Java EE 8)
PPTX
Java ee 8 + security overview
PPTX
Extending Arquillian graphene
PPTX
Octopus framework; Permission based security framework for Java EE
jakarta-integration-testing.pdf
core-profile_jakartaOne2022.pdf
MicroStream-WithoutDatabase.pdf
Jakarta EE 8 on JDK17
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
Creating a Kubernetes Operator in Java
Finally, easy integration testing with Testcontainers
Transactions in micro-services (summer 2019)
Secure JAX-RS
From Monolith to micro-services and back : The Self Contained Systems
Java EE Security API - JSR375: Getting Started
What is tackled in the Java EE Security API (Java EE 8)
Java ee 8 + security overview
Extending Arquillian graphene
Octopus framework; Permission based security framework for Java EE

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
top salesforce developer skills in 2025.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Understanding Forklifts - TECH EHS Solution
PDF
medical staffing services at VALiNTRY
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Introduction to Artificial Intelligence
PDF
Complete React Javascript Course Syllabus.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
System and Network Administraation Chapter 3
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Essential Infomation Tech presentation.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
System and Network Administration Chapter 2
ManageIQ - Sprint 268 Review - Slide Deck
Materi_Pemrograman_Komputer-Looping.pptx
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
top salesforce developer skills in 2025.pdf
Odoo POS Development Services by CandidRoot Solutions
Understanding Forklifts - TECH EHS Solution
medical staffing services at VALiNTRY
Operating system designcfffgfgggggggvggggggggg
Introduction to Artificial Intelligence
Complete React Javascript Course Syllabus.pdf
PTS Company Brochure 2025 (1).pdf.......
System and Network Administraation Chapter 3
L1 - Introduction to python Backend.pptx
Transform Your Business with a Software ERP System
2025 Textile ERP Trends: SAP, Odoo & Oracle
Essential Infomation Tech presentation.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
System and Network Administration Chapter 2

Control and monitor_microservices_with_microprofile

  • 1. Deploy, monitor, and take control of your micro-services with MicroProfile
  • 2. • How do you monitor this? • Observability Octo Blog
  • 3. What You’ll Learn Today • Metrics Background • MicroProfile: Metrics - Fault Tolerance • Application Metrics - Prometheus - Grafana
  • 4. Rudy De Busscher • Payara • Service team • JSR-375 • MicroProfile committer • Committer in Eclipse EE4J groups - Jakarta EE • Java EE Security API Expert group member @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 • Monitoring
  • 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 • …
  • 10. Test system Payara
 Server Prometheus Grafana Time series DB Graphics
 Dashboards Expose metrics Using Docker containers
  • 11. Setup demo environment • Creating containers • Connecting them together • ‘service’ simulation • Create load through ‘bad’ parallel Prime values calculation.
  • 12. Demo
  • 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
  • 18. Prometheus alternatives • Graphite • Need to push metrics to it • Influx DB • Needs rest of stack (Telegraf - Chronograf - Capacitor)
  • 19. Grafana • Open Source tool for visualization • query, visualize, alert on • For time series
  • 20. • Kibana • Recent improved support for time-series • Works only on top of ElasticSearch Grafana alternatives
  • 21. On events • Invocation Count • @Counted • Execution time information • @Timed • @Metered • More detailed information with Tracing Freepik 2
  • 22. Fault Tolerance • Number of retries • @Retry • @CircuitBreaker • Open, Half-Open, Closed • @BulkHead • Accepted, Rejected • @Callback • # calls Freepik 3
  • 24. Developer defined • Custom defined values • @Gauge • On field or getter • If business value, store them somewhere Freepik 4
  • 25. Kubernetes • Orchestration • Docker-compose • Ideal for smaller ‘installations’ • Open-Source Platform to Manage containers • Not only docker containers • Core tasks • Deployment • Scale • Monitoring
  • 27. Kubernetes Monitoring • Metrics • Metrics for k8s processes/actions • Metrics-server • Scaling • Horizontal Pod scaling (kubectl autoscale ) • Monitoring • Restart pods • Keep system ‘healthy'
  • 28. K8s monitoring • Demo • Kill server • Automatic recovering
  • 29. Demo K8s monitoring • K8S • Kill server/container/pod • Automatic recovering • Prometheus within k8s
  • 30. 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
  • 31. Code • MicroProfile • https://microprofile.io • Demo code • https://github.com/rdebusscher/mp-metrics-demo
  • 32. Q & A
  • 33. 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