SlideShare a Scribd company logo
Monitoring your Spring Boot and Micronaut microservices
with Micrometer
JCON2020#
www.jcon.one
Ko Turk
Senior Java Developer
Our Partners 2020:
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
You’re part of a racing team
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Sounds silly right?
But what if we don’t have this kind of information?
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
But why don’t we (developers) think about proper monitoring?
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Title Text
https://formulaf1results.blogspot.com/2020/01/f1-crash-wallpaper.html
Application X Application Y
Backend
(still driving but slow)
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
If that’s happening…..
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Of course you can log it but…..
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
A log is an event that happened
A metric is a measurement of the health of a system.
https://www.sumologic.com/blog/logs-metrics-overview/
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
That’s where
Micrometer comes in
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Introduction
Working
for Blue4IT
@Rabobank
Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
https://www.signifytechnology.com/blog/2019/09/whats-your-tech-stack
Java 14Spring Boot
Typescript
Angular
Cloud Foundry
Pipeline as code Micrometer
Speaking
about IDEs and Micrometer
Likes to drive
the trial bike
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
UtrechtJUG
Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
https://www.redbull.com/nl-nl/red-bull-racing-zet-de-fabrieksdeuren-open
Create the teams strategy
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
What do we want to monitor?
Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
How to be good in DevOps?
https://landing.google.com/sre/sre-book/toc/index.html
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
It’s about
• Searching for race factors —> Service Level Indicators
• Creating tactics —> Service Level Objectives
• Creating a strategy —> Service Level Agreement
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Racing Factors —> Defining an indicator (SLI)
• pitstop
request latency
How long does it take to do a pitstop
How long does it take to return a response
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Tactics —> Defining an objective (SLO)
not slower then 8 seconds
service x not longer then 0.1 seconds
• pitstop
request latency
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Strategy —> Defining an agreement (SLA)
• 2 pitstops less then x seconds
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Micrometer for the win!
But what is it?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
SLF4J only for metrics
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Reasons to use Micrometer
• No vendor lock-in
• It’s Pivotal VMWare Tanzu
• Easy integration in Spring Boot
• So also support in Cloud Foundry
• Simple to use
• You can choose your own database / monitoring system
• You can define your own set of metrics
• But you get a lot for free
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Micrometer is included in Spring Boot 2 actuator
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Extra dependency for Spring Boot 1.5.x
I<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId>
</dependency>
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
And also for Micronaut
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Pre-configured Bindings
• Instrumentions of:
• caches
• class loader
• garbage collection
• processor utilisation
• thread pools
• and more
Monitoring your Spring Boot and Micronaut microservices with Micrometer
https://i.ytimg.com/vi/eVpRNi5VEDo/maxresdefault.jpg
Demo time
Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Long Task Timer
https://i.pinimg.com/originals/fb/5b/98/fb5b98edf68000f44e89d6428a3e2c65.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Timer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
https://s1.cdn.autoevolution.com/images/news/gallery/red-bull-racing-beats-record-to-set-new-fastest-pit-stop-in-the-history-of-f1_2.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Counter
https://www.wallpaperflare.com/static/467/219/735/mercedes-amg-f1-w07-hybrid-formula-1-testing-wallpaper.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Gauge
https://cdn.24.co.za/files/Cms/General/d/4338/1678467a9d9149b983f38424014fb2c0.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
About security
• Please implement spring security
• Otherwise you will expose your endpoint to others
• And don’t forget to add it in your database config!
https://www.baeldung.com/spring-security-basic-authentication
https://egkatzioura.com/2020/05/07/spring-boot-and-micrometer-with-prometheus-part-6-securing-metrics/
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Where to store the metrics?
Which database should I use?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Databases
• Prometheus
• Graphite
• Atlas
• KairosDB
Persistent or not persistent?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
If you want to expose to prometheus
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Or Graphite
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-graphite</artifactId>
</dependency>

Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
How to configure your application
with prometheus
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
https://blog.purestorage.com/wp-content/uploads/2016/07/Pure-MBF1-Pitwall-v6.jpg
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
How to visualise the application metrics?
Which monitoring system to use?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Systems
• Grafana
• Datadog
• Dynatrace
• Instant
• WaveFront
• and many more
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Let’s deep dive into Grafana
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Long Task Timer (duration)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Timer (count)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Timer (max)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Gauge
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Bindings
Monitoring your Spring Boot and Micronaut microservices with Micrometer
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer
Title Text
Monitoring your Spring Boot and Micronaut microservices with Micrometer
All examples you can find at:
https://github.com/KoTurk/micrometer-race-demo
@KoTurk77
Thank you for listening

More Related Content

PDF
Controlling your race with Micrometer and Spring Boot (live coding!)
PDF
Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag)
PDF
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
PDF
Controlling your race with Micrometer, Spring Boot and Cloud Foundry
PPTX
Microsoft Graph Toolkitを使ってGraph開発を体験しよう
PDF
Microservices development at scale
PDF
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
PDF
As an Attacker, I Want Your Data: Anticipating Security Threats
Controlling your race with Micrometer and Spring Boot (live coding!)
Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag)
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Microsoft Graph Toolkitを使ってGraph開発を体験しよう
Microservices development at scale
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
As an Attacker, I Want Your Data: Anticipating Security Threats

What's hot (9)

PPT
DSDP Mobile Tools for Java New and Noteworthy
PPT
DSDP Mobile Tools for Java New and Noteworthy
PDF
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
PDF
Cisco at v mworld 2015 shipped-vmworld
PPTX
Development and continuous deployment with microservicies
PDF
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
PDF
Scaling with Microservices
PDF
20201015 Azure PaaS Update at Microsoft Ignite 2020
PPTX
Back from Microsoft //Build 2018
DSDP Mobile Tools for Java New and Noteworthy
DSDP Mobile Tools for Java New and Noteworthy
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
Cisco at v mworld 2015 shipped-vmworld
Development and continuous deployment with microservicies
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
Scaling with Microservices
20201015 Azure PaaS Update at Microsoft Ignite 2020
Back from Microsoft //Build 2018
Ad

Similar to Monitoring your Spring Boot and Micronaut microservices with Micrometer (20)

PDF
JavaLand - Micrometer and SpringBoot
PDF
Code Motion Italy
PDF
Micro Frontends for Java Microservices - Dublin JUG 2022
PDF
Micro Frontends for Java Microservices - Belfast JUG 2022
PDF
Micro Frontends for Java Microservices - Cork JUG 2022
PPTX
Administering power platform deployment planning
PPTX
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
PPTX
Universal Actions for Adaptive Cards on Microsoft Teams
PDF
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
PDF
[AI] ML Operationalization with Microsoft Azure
PDF
Continuous (Non-)Functional Testing of Microservices on K8s
PPTX
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
PDF
Building application in a "Microfrontends" way - Prasanna N Venkatesen *XConf...
PDF
Accelerate Spring Apps to Cloud at Scale
PDF
Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...
PDF
Welcome to the Metrics
PPTX
Securing microservices continuous delivery using grafeas and kritis
PDF
State of microservices 2020 by tsh
PPTX
Building the Perfect Microsoft 365 Tenant - Microsoft 365 Virtual Marathon
PDF
Building application in a "Microfrontends" way - Matthias Lauf *XConf Manchester
JavaLand - Micrometer and SpringBoot
Code Motion Italy
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
Administering power platform deployment planning
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
Universal Actions for Adaptive Cards on Microsoft Teams
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
[AI] ML Operationalization with Microsoft Azure
Continuous (Non-)Functional Testing of Microservices on K8s
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Building application in a "Microfrontends" way - Prasanna N Venkatesen *XConf...
Accelerate Spring Apps to Cloud at Scale
Accelerate Spring Apps to Cloud at Scale—Discussion with Azure Spring Cloud C...
Welcome to the Metrics
Securing microservices continuous delivery using grafeas and kritis
State of microservices 2020 by tsh
Building the Perfect Microsoft 365 Tenant - Microsoft 365 Virtual Marathon
Building application in a "Microfrontends" way - Matthias Lauf *XConf Manchester
Ad

More from Ko Turk (7)

PDF
JCON - The Battle of the IDEs
PDF
The Battle of the IDEs @DevNexus 2020
PPTX
JVM Conference - The Battle of the IDEs
PPTX
"The Battle of the IDEs"
PDF
12092019 JavaZone "The Battle of the IDEs"
PDF
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
PPTX
The Battle of the IDEs
JCON - The Battle of the IDEs
The Battle of the IDEs @DevNexus 2020
JVM Conference - The Battle of the IDEs
"The Battle of the IDEs"
12092019 JavaZone "The Battle of the IDEs"
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
The Battle of the IDEs

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPT
Teaching material agriculture food technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation theory and applications.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
“AI and Expert System Decision Support & Business Intelligence Systems”
SOPHOS-XG Firewall Administrator PPT.pptx
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
Tartificialntelligence_presentation.pptx
Machine Learning_overview_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)

Monitoring your Spring Boot and Micronaut microservices with Micrometer

  • 1. Monitoring your Spring Boot and Micronaut microservices with Micrometer JCON2020# www.jcon.one Ko Turk Senior Java Developer Our Partners 2020:
  • 2. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer You’re part of a racing team
  • 4. Sounds silly right? But what if we don’t have this kind of information?
  • 5. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer But why don’t we (developers) think about proper monitoring?
  • 6. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Title Text https://formulaf1results.blogspot.com/2020/01/f1-crash-wallpaper.html Application X Application Y Backend (still driving but slow)
  • 7. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer If that’s happening…..
  • 8. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Of course you can log it but…..
  • 9. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer A log is an event that happened A metric is a measurement of the health of a system. https://www.sumologic.com/blog/logs-metrics-overview/
  • 10. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer That’s where Micrometer comes in
  • 11. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Introduction
  • 14. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer https://www.signifytechnology.com/blog/2019/09/whats-your-tech-stack
  • 15. Java 14Spring Boot Typescript Angular Cloud Foundry Pipeline as code Micrometer
  • 17. Likes to drive the trial bike
  • 18. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer UtrechtJUG
  • 20. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana (Create the teams strategy) (Preparing the car/race) (The teams Pitwall)
  • 22. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer What do we want to monitor?
  • 24. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer How to be good in DevOps?
  • 26. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer It’s about • Searching for race factors —> Service Level Indicators • Creating tactics —> Service Level Objectives • Creating a strategy —> Service Level Agreement
  • 27. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Racing Factors —> Defining an indicator (SLI) • pitstop request latency How long does it take to do a pitstop How long does it take to return a response
  • 28. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Tactics —> Defining an objective (SLO) not slower then 8 seconds service x not longer then 0.1 seconds • pitstop request latency
  • 29. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Strategy —> Defining an agreement (SLA) • 2 pitstops less then x seconds
  • 30. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana (Create the teams strategy) (Preparing the car/race) (The teams Pitwall)
  • 32. Micrometer for the win! But what is it?
  • 33. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer SLF4J only for metrics
  • 34. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Reasons to use Micrometer • No vendor lock-in • It’s Pivotal VMWare Tanzu • Easy integration in Spring Boot • So also support in Cloud Foundry • Simple to use • You can choose your own database / monitoring system • You can define your own set of metrics • But you get a lot for free
  • 35. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Micrometer is included in Spring Boot 2 actuator <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
  • 36. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Extra dependency for Spring Boot 1.5.x I<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-spring-legacy</artifactId> </dependency>
  • 37. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer And also for Micronaut
  • 38. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Pre-configured Bindings • Instrumentions of: • caches • class loader • garbage collection • processor utilisation • thread pools • and more
  • 42. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Long Task Timer
  • 44. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Timer
  • 45. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer https://s1.cdn.autoevolution.com/images/news/gallery/red-bull-racing-beats-record-to-set-new-fastest-pit-stop-in-the-history-of-f1_2.jpg
  • 46. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Counter
  • 48. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Gauge
  • 50. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer About security • Please implement spring security • Otherwise you will expose your endpoint to others • And don’t forget to add it in your database config! https://www.baeldung.com/spring-security-basic-authentication https://egkatzioura.com/2020/05/07/spring-boot-and-micrometer-with-prometheus-part-6-securing-metrics/
  • 51. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana (Create the teams strategy) (Preparing the car/race) (The teams Pitwall)
  • 52. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Where to store the metrics? Which database should I use?
  • 53. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Databases • Prometheus • Graphite • Atlas • KairosDB Persistent or not persistent?
  • 54. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer If you want to expose to prometheus <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency>

  • 55. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Or Graphite <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-graphite</artifactId> </dependency>

  • 57. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer How to configure your application with prometheus
  • 58. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana (Create the teams strategy) (Preparing the car/race) (The teams Pitwall)
  • 60. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer How to visualise the application metrics? Which monitoring system to use?
  • 61. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Systems • Grafana • Datadog • Dynatrace • Instant • WaveFront • and many more
  • 62. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Let’s deep dive into Grafana
  • 63. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Long Task Timer (duration)
  • 64. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Timer (count)
  • 65. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Timer (max)
  • 66. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Gauge
  • 67. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Bindings
  • 69. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Monitoring your Spring Boot and Micronaut microservices with Micrometer Title Text
  • 71. All examples you can find at: https://github.com/KoTurk/micrometer-race-demo @KoTurk77 Thank you for listening