SlideShare a Scribd company logo
1 of 73
Download to read offline
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
You’re part of a racing team
Sounds silly right?
But what if we don’t have this kind of information?
@KoTurk77
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
But why don’t we (developers) think about proper monitoring?
@KoTurk77
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
If that’s happening…..
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Of course you can log it but…..
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
That’s where
Micrometer comes in
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Introduction
Speaking
about IDEs and Micrometer
Likes to drive
the trial bike
Working
for Blue4IT
@Rabobank
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
https://www.signifytechnology.com/blog/2019/09/whats-your-tech-stack
Java 14
Spring Boot
Typescript
Angular
Cloud Foundry
Pipeline as code Micrometer
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
What do we want to monitor?
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
How to be good in DevOps?
https://landing.google.com/sre/sre-book/toc/index.html
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Tactics —> Defining an objective (SLO)
Shouldn’t take more than 8 seconds
Shouldn’t be taking more than 0.1 seconds
• pitstop
request latency
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Strategy —> Defining an agreement (SLA)
• 2 pitstops less then 8 seconds
99,9 % of all requests less than 0.1 seconds
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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)
Micrometer for the win!
But what is it?
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
SLF4J only for metrics
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
And also for Micronaut
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Pre-configured Bindings
• Instrumentions of:
• caches
• class loader
• garbage collection
• processor utilisation
• thread pools
• and more
https://i.ytimg.com/vi/eVpRNi5VEDo/maxresdefault.jpg
Demo time
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Long Task Timer
https://i.pinimg.com/originals/fb/5b/98/fb5b98edf68000f44e89d6428a3e2c65.jpg
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Timer
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Histograms
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Gauge
https://cdn.24.co.za/files/Cms/General/d/4338/1678467a9d9149b983f38424014fb2c0.jpg
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Sensitive data (!)
• Disable endpoints you don’t need
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Where to store the metrics?
Which database should I use?
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Databases
• Prometheus
• Graphite
• Atlas
• KairosDB
Persistent or not persistent?
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Or Graphite
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-graphite</artifactId>
</dependency>

@KoTurk77
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
How to configure your application
with prometheus
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
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
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
How to visualise the application metrics?
Which monitoring system to use?
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Systems
• Grafana
• Datadog
• Dynatrace
• Instant
• WaveFront
• and many more
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Let’s deep dive into Grafana
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Long Task Timer (duration)
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Timer (count)
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Timer (max)
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Gauge
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Bindings
@KoTurk77
@KoTurk77 The Battle of the IDEs #Devnexus
@KoTurk77
Controlling your race with Micrometer and Spring Boot (2.x)
Title Text
All examples you can find at:
https://github.com/KoTurk/
@KoTurk77
Thank you for listening

More Related Content

Similar to Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag)

Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsWeaveworks
 
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsXebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsPublicis Sapient Engineering
 
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)bridgetkromhout
 
Cleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsCleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsDebora Gomez Bertoli
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023Matthew Groves
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoringRobert Munteanu
 
Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)bridgetkromhout
 
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)bridgetkromhout
 
Continuous (Non-)Functional Testing of Microservices on K8s
Continuous (Non-)Functional Testing of Microservices on K8sContinuous (Non-)Functional Testing of Microservices on K8s
Continuous (Non-)Functional Testing of Microservices on K8sQAware GmbH
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityWeaveworks
 
Building and deploying microservices to Azure with GitHub and Waypoint
Building and deploying microservices to Azure with GitHub and Waypoint Building and deploying microservices to Azure with GitHub and Waypoint
Building and deploying microservices to Azure with GitHub and Waypoint CEDRIC DERUE
 
Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)bridgetkromhout
 
Visual Cryptography Projects
Visual Cryptography ProjectsVisual Cryptography Projects
Visual Cryptography ProjectsPhdtopiccom
 
Building Microservices in the cloud at AutoScout24
Building Microservices in the cloud at AutoScout24Building Microservices in the cloud at AutoScout24
Building Microservices in the cloud at AutoScout24Christian Deger
 
Eclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupadoEclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupadoVíctor Leonel Orozco López
 
Breaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an ApplicationBreaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an ApplicationMark Rendell
 
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to Production
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to ProductionOpenTelemetry For GitOps: Tracing Deployments from Git Commit to Production
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to ProductionAndreas Grabner
 
Building Twitter's SDKs for Android
Building Twitter's SDKs for AndroidBuilding Twitter's SDKs for Android
Building Twitter's SDKs for AndroidAndy Piper
 

Similar to Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag) (20)

Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOps
 
Setting up your first open gl program
Setting up your first open gl programSetting up your first open gl program
Setting up your first open gl program
 
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsXebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
 
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
 
Cleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsCleaning your architecture with android architecture components
Cleaning your architecture with android architecture components
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoring
 
Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)
 
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
 
Continuous (Non-)Functional Testing of Microservices on K8s
Continuous (Non-)Functional Testing of Microservices on K8sContinuous (Non-)Functional Testing of Microservices on K8s
Continuous (Non-)Functional Testing of Microservices on K8s
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
Building and deploying microservices to Azure with GitHub and Waypoint
Building and deploying microservices to Azure with GitHub and Waypoint Building and deploying microservices to Azure with GitHub and Waypoint
Building and deploying microservices to Azure with GitHub and Waypoint
 
Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)Day 2 Kubernetes - Tools for Operability (HashiConf)
Day 2 Kubernetes - Tools for Operability (HashiConf)
 
Visual Cryptography Projects
Visual Cryptography ProjectsVisual Cryptography Projects
Visual Cryptography Projects
 
Building Microservices in the cloud at AutoScout24
Building Microservices in the cloud at AutoScout24Building Microservices in the cloud at AutoScout24
Building Microservices in the cloud at AutoScout24
 
Eclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupadoEclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupado
 
Breaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an ApplicationBreaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an Application
 
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to Production
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to ProductionOpenTelemetry For GitOps: Tracing Deployments from Git Commit to Production
OpenTelemetry For GitOps: Tracing Deployments from Git Commit to Production
 
Building Twitter's SDKs for Android
Building Twitter's SDKs for AndroidBuilding Twitter's SDKs for Android
Building Twitter's SDKs for Android
 

More from Ko Turk

JavaLand - Micrometer and SpringBoot
JavaLand - Micrometer and SpringBootJavaLand - Micrometer and SpringBoot
JavaLand - Micrometer and SpringBootKo Turk
 
JCON - The Battle of the IDEs
JCON - The Battle of the IDEsJCON - The Battle of the IDEs
JCON - The Battle of the IDEsKo Turk
 
JVM Conference - The Battle of the IDEs
JVM Conference - The Battle of the IDEsJVM Conference - The Battle of the IDEs
JVM Conference - The Battle of the IDEsKo Turk
 
"The Battle of the IDEs"
"The Battle of the IDEs""The Battle of the IDEs"
"The Battle of the IDEs"Ko Turk
 
12092019 JavaZone "The Battle of the IDEs"
12092019 JavaZone "The Battle of the IDEs"12092019 JavaZone "The Battle of the IDEs"
12092019 JavaZone "The Battle of the IDEs"Ko Turk
 
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / ConspectKo Turk
 
The Battle of the IDEs
The Battle of the IDEsThe Battle of the IDEs
The Battle of the IDEsKo Turk
 

More from Ko Turk (7)

JavaLand - Micrometer and SpringBoot
JavaLand - Micrometer and SpringBootJavaLand - Micrometer and SpringBoot
JavaLand - Micrometer and SpringBoot
 
JCON - The Battle of the IDEs
JCON - The Battle of the IDEsJCON - The Battle of the IDEs
JCON - The Battle of the IDEs
 
JVM Conference - The Battle of the IDEs
JVM Conference - The Battle of the IDEsJVM Conference - The Battle of the IDEs
JVM Conference - The Battle of the IDEs
 
"The Battle of the IDEs"
"The Battle of the IDEs""The Battle of the IDEs"
"The Battle of the IDEs"
 
12092019 JavaZone "The Battle of the IDEs"
12092019 JavaZone "The Battle of the IDEs"12092019 JavaZone "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
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
05092019 The Battle of the IDEs by Ko Turk at the AlmereJUG / Conspect
 
The Battle of the IDEs
The Battle of the IDEsThe Battle of the IDEs
The Battle of the IDEs
 

Recently uploaded

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Controlling your race with Micrometer and Spring Boot / Micronaut (Brown Bag)

  • 1.
  • 2. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) You’re part of a racing team
  • 3.
  • 4. Sounds silly right? But what if we don’t have this kind of information?
  • 5. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) But why don’t we (developers) think about proper monitoring?
  • 6. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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 @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) If that’s happening…..
  • 8. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Of course you can log it but…..
  • 9. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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 @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) That’s where Micrometer comes in
  • 11. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Introduction
  • 13. Likes to drive the trial bike
  • 15.
  • 16. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) https://www.signifytechnology.com/blog/2019/09/whats-your-tech-stack
  • 17. Java 14 Spring Boot Typescript Angular Cloud Foundry Pipeline as code Micrometer
  • 18.
  • 19. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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)
  • 21. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) What do we want to monitor?
  • 22.
  • 23. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) How to be good in DevOps?
  • 25. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) It’s about • Searching for race factors —> Service Level Indicators • Creating tactics —> Service Level Objectives • Creating a strategy —> Service Level Agreement
  • 26. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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
  • 27. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Tactics —> Defining an objective (SLO) Shouldn’t take more than 8 seconds Shouldn’t be taking more than 0.1 seconds • pitstop request latency
  • 28. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Strategy —> Defining an agreement (SLA) • 2 pitstops less then 8 seconds 99,9 % of all requests less than 0.1 seconds
  • 29. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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)
  • 30.
  • 31. Micrometer for the win! But what is it?
  • 32. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) SLF4J only for metrics
  • 33. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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
  • 34. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Micrometer is included in Spring Boot 2 actuator <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
  • 35. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Extra dependency for Spring Boot 1.5.x I<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-spring-legacy</artifactId> </dependency>
  • 36. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) And also for Micronaut
  • 37. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Pre-configured Bindings • Instrumentions of: • caches • class loader • garbage collection • processor utilisation • thread pools • and more
  • 38.
  • 40. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Long Task Timer
  • 42. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Timer
  • 43. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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
  • 44. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Histograms
  • 45. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x)
  • 46. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x)
  • 47. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Counter
  • 49. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Gauge
  • 51. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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/
  • 52. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Sensitive data (!) • Disable endpoints you don’t need
  • 53. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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)
  • 54. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Where to store the metrics? Which database should I use?
  • 55. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Databases • Prometheus • Graphite • Atlas • KairosDB Persistent or not persistent?
  • 56. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) If you want to expose to prometheus <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency>

  • 57. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Or Graphite <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-graphite</artifactId> </dependency>

  • 58.
  • 59. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) How to configure your application with prometheus
  • 60. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) 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)
  • 62. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) How to visualise the application metrics? Which monitoring system to use?
  • 63. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Systems • Grafana • Datadog • Dynatrace • Instant • WaveFront • and many more
  • 64. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Let’s deep dive into Grafana
  • 65. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Long Task Timer (duration)
  • 66. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Timer (count)
  • 67. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Timer (max)
  • 68. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Gauge
  • 69. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Bindings
  • 70.
  • 71. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Title Text
  • 72.
  • 73. All examples you can find at: https://github.com/KoTurk/ @KoTurk77 Thank you for listening