SlideShare a Scribd company logo
Ko Turk
Controlling your race with
Micrometer, Spring Boot
and Cloud Foundry
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
You’re part of a racing team
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
Sounds silly right?
But what if we don’t have this kind of information?
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
But why don’t we (developers) think about proper monitoring?
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
If that’s happening…..
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Of course you can log it but…..
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
That’s where
Micrometer comes in
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Introduction
Working
for Blue4IT
@Rabobank
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
UtrechtJUG
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
Deploy to Cloud Foundry
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
(Let’s race)
https://www.redbull.com/nl-nl/red-bull-racing-zet-de-fabrieksdeuren-open
Create the teams strategy
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
What do we want to monitor?
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
How to be good in DevOps?
https://landing.google.com/sre/sre-book/toc/index.html
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Strategy —> Defining an agreement (SLA)
• 2 pitstops less then x seconds
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
Deploy to Cloud Foundry
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
(Let’s race)
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
Micrometer for the win!
But what is it?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
SLF4J only for metrics
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
And also for Micronaut
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Pre-configured Bindings
• Instrumentions of:
• caches
• class loader
• garbage collection
• processor utilisation
• thread pools
• and more
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
https://i.ytimg.com/vi/eVpRNi5VEDo/maxresdefault.jpg
Demo time
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Long Task Timer
https://i.pinimg.com/originals/fb/5b/98/fb5b98edf68000f44e89d6428a3e2c65.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Timer
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Gauge
https://cdn.24.co.za/files/Cms/General/d/4338/1678467a9d9149b983f38424014fb2c0.jpg
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
Deploy to Cloud Foundry
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
(Let’s race)
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Where to store the metrics?
Which database should I use?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Databases
• Prometheus
• Graphite
• Atlas
• KairosDB
Persistent or not persistent?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Or Graphite
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-graphite</artifactId>
</dependency>

Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
How to configure your application
with prometheus
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
Deploy to Cloud Foundry
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
(Let’s race)
https://blog.purestorage.com/wp-content/uploads/2016/07/Pure-MBF1-Pitwall-v6.jpg
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
How to visualise the application metrics?
Which monitoring system to use?
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Systems
• Grafana
• Datadog
• Dynatrace
• Instant
• WaveFront
• and many more
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Let’s deep dive into Grafana
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Long Task Timer (duration)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Timer (count)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Timer (max)
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Gauge
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Bindings
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Goals
Define the metrics
Create them in Micrometer
Save it to Prometheus
Visualize with Grafana
Deploy to Cloud Foundry
(Create the teams strategy)
(Preparing the car/race)
(The teams Pitwall)
(Let’s race)
@KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry
Title Text
Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle
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 / Micronaut (Brown Bag)
PDF
Controlling your race with Micrometer and Spring Boot (live coding!)
PDF
Monitoring your Spring Boot and Micronaut microservices with Micrometer
PPTX
REALITY iOSアプリを支える開発効率化
PDF
Delivering Quality at Speed with GitOps
PDF
Workshop Azure DevOps Repos
PDF
Software Supply Chain Management with Grafeas and Kritis
PDF
Binary Authorization in Kubernetes
Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag)
Controlling your race with Micrometer and Spring Boot (live coding!)
Monitoring your Spring Boot and Micronaut microservices with Micrometer
REALITY iOSアプリを支える開発効率化
Delivering Quality at Speed with GitOps
Workshop Azure DevOps Repos
Software Supply Chain Management with Grafeas and Kritis
Binary Authorization in Kubernetes

What's hot (19)

PDF
Software Supply Chains for DevOps @ InfoQ Live 2021
PDF
Software Supply Chain Observability with Grafeas and Kritis
PDF
Spring Boot Observability
PDF
Software Supply Chain Management with Grafeas and Kritis
PDF
게임 서버 성능 분석하기
PDF
Speeding up your team with GitOps
PDF
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
PDF
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
PPTX
アプリ起動時間高速化 ~推測するな、計測せよ~
PDF
Kerbernetes Robotics Distributed System Deep Dive
PDF
The path to cdi 2.0
PDF
WWCode Dallas - Kubernetes: Learning from Zero to Production
PPTX
Kubernetes Controller for Pull Request Based Environment
PDF
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
PDF
Microservices development at scale
PDF
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
PDF
Gitops Hands On
PDF
From Monolith to K8s - Spring One 2020
PDF
給 RD 的 Kubernetes 初體驗 (GDG Cloud KH 2019-08 version)
Software Supply Chains for DevOps @ InfoQ Live 2021
Software Supply Chain Observability with Grafeas and Kritis
Spring Boot Observability
Software Supply Chain Management with Grafeas and Kritis
게임 서버 성능 분석하기
Speeding up your team with GitOps
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
アプリ起動時間高速化 ~推測するな、計測せよ~
Kerbernetes Robotics Distributed System Deep Dive
The path to cdi 2.0
WWCode Dallas - Kubernetes: Learning from Zero to Production
Kubernetes Controller for Pull Request Based Environment
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Microservices development at scale
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Gitops Hands On
From Monolith to K8s - Spring One 2020
給 RD 的 Kubernetes 初體驗 (GDG Cloud KH 2019-08 version)
Ad

Similar to Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle (20)

PDF
Controlling your race with Micrometer, Spring Boot and Cloud Foundry
PDF
JavaLand - Micrometer and SpringBoot
PDF
Code Motion Italy
PDF
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
PDF
[AI] ML Operationalization with Microsoft Azure
PDF
A Hitchhiker's Guide to Enterprise Microservices with Go
PDF
How to get trusted AI in your favorite IDE
PDF
Continuous (Non-)Functional Testing of Microservices on K8s
PDF
How to get trusted AI in your favorite IDE
PPTX
Agile azure manchester azure user group v3
PDF
Tampere Docker meetup - Happy 5th Birthday Docker
PPTX
Building Microservices in the cloud at AutoScout24
PDF
Embedding WPE WebKit - from Bring-up to Maintenance
PDF
The Battle of the IDEs @DevNexus 2020
PDF
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
PDF
Go for Operations
PPTX
Supercharging your Python Development Environment with VS Code and Dev Contai...
PDF
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
PDF
Cloud, Containers, Kubernetes (YOW Sydney 2018)
PDF
20250403-trusted-ai-favorite-ide-javaland.pdf
Controlling your race with Micrometer, Spring Boot and Cloud Foundry
JavaLand - Micrometer and SpringBoot
Code Motion Italy
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
[AI] ML Operationalization with Microsoft Azure
A Hitchhiker's Guide to Enterprise Microservices with Go
How to get trusted AI in your favorite IDE
Continuous (Non-)Functional Testing of Microservices on K8s
How to get trusted AI in your favorite IDE
Agile azure manchester azure user group v3
Tampere Docker meetup - Happy 5th Birthday Docker
Building Microservices in the cloud at AutoScout24
Embedding WPE WebKit - from Bring-up to Maintenance
The Battle of the IDEs @DevNexus 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Go for Operations
Supercharging your Python Development Environment with VS Code and Dev Contai...
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)
20250403-trusted-ai-favorite-ide-javaland.pdf
Ad

More from Ko Turk (6)

PDF
JCON - The Battle of the IDEs
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
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
Getting Started with Data Integration: FME Form 101
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Electronic commerce courselecture one. Pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
A Presentation on Artificial Intelligence
Getting Started with Data Integration: FME Form 101
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation_ Review paper, used for researhc scholars
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A comparative analysis of optical character recognition models for extracting...
Big Data Technologies - Introduction.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Tartificialntelligence_presentation.pptx
1. Introduction to Computer Programming.pptx
NewMind AI Weekly Chronicles - August'25-Week II
MYSQL Presentation for SQL database connectivity
A Presentation on Artificial Intelligence

Controlling your race with Micrometer, Spring Boot and Cloud Foundry @Geekle

  • 1. Ko Turk Controlling your race with Micrometer, Spring Boot and Cloud Foundry
  • 2. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry But why don’t we (developers) think about proper monitoring?
  • 6. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry If that’s happening…..
  • 8. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Of course you can log it but…..
  • 9. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry That’s where Micrometer comes in
  • 11. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Introduction
  • 14. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry UtrechtJUG
  • 20. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana Deploy to Cloud Foundry (Create the teams strategy) (Preparing the car/race) (The teams Pitwall) (Let’s race)
  • 22. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry What do we want to monitor?
  • 24. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry How to be good in DevOps?
  • 26. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Strategy —> Defining an agreement (SLA) • 2 pitstops less then x seconds
  • 30. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana Deploy to Cloud Foundry (Create the teams strategy) (Preparing the car/race) (The teams Pitwall) (Let’s race)
  • 32. Micrometer for the win! But what is it?
  • 33. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry SLF4J only for metrics
  • 34. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry And also for Micronaut
  • 38. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Pre-configured Bindings • Instrumentions of: • caches • class loader • garbage collection • processor utilisation • thread pools • and more
  • 41. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Long Task Timer
  • 43. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Timer
  • 44. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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
  • 45. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Counter
  • 47. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Gauge
  • 49. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry 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/
  • 50. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Goals Define the metrics Create them in Micrometer Save it to Prometheus Visualize with Grafana Deploy to Cloud Foundry (Create the teams strategy) (Preparing the car/race) (The teams Pitwall) (Let’s race)
  • 51. @KoTurk77@KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Where to store the metrics? Which database should I use?
  • 52. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Databases • Prometheus • Graphite • Atlas • KairosDB Persistent or not persistent?
  • 53. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry If you want to expose to prometheus <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency>

  • 54. @KoTurk77 The Battle of the IDEs #Devnexus@KoTurk77Controlling your race with Micrometer, Spring Boot and Cloud Foundry Or Graphite <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-graphite</artifactId> </dependency>

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