SlideShare a Scribd company logo
1 of 72
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)
not slower then 8 seconds
service x not longer then 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 x 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)
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/micrometer-race-demo
@KoTurk77
Thank you for listening

More Related Content

Similar to Controlling your race with Micrometer and Spring Boot (live coding!)

Visual Cryptography Projects
Visual Cryptography ProjectsVisual Cryptography Projects
Visual Cryptography ProjectsPhdtopiccom
 
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
 
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
 
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
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoringRobert Munteanu
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Matt Raible
 
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
 
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
 
Universal Actions for Adaptive Cards on Microsoft Teams
Universal Actions for Adaptive Cards on Microsoft TeamsUniversal Actions for Adaptive Cards on Microsoft Teams
Universal Actions for Adaptive Cards on Microsoft TeamsNanddeep Nachan
 
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
 
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?Kevin Sutter
 
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
 
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
 
What should you know about Net Core?
What should you know about Net Core?What should you know about Net Core?
What should you know about Net Core?Damir Dobric
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSITCamp
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Enea Gabriel
 

Similar to Controlling your race with Micrometer and Spring Boot (live coding!) (20)

Real_World_0days.pdf
Real_World_0days.pdfReal_World_0days.pdf
Real_World_0days.pdf
 
Visual Cryptography Projects
Visual Cryptography ProjectsVisual Cryptography Projects
Visual Cryptography Projects
 
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
 
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
 
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
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoring
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
 
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
 
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
 
Universal Actions for Adaptive Cards on Microsoft Teams
Universal Actions for Adaptive Cards on Microsoft TeamsUniversal Actions for Adaptive Cards on Microsoft Teams
Universal Actions for Adaptive Cards on Microsoft Teams
 
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
 
Jenkins x azure
Jenkins x azureJenkins x azure
Jenkins x azure
 
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
 
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)Cloud, Containers, Kubernetes (YOW Melbourne 2018)
Cloud, Containers, Kubernetes (YOW Melbourne 2018)
 
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
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
What should you know about Net Core?
What should you know about Net Core?What should you know about Net Core?
What should you know about Net Core?
 
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
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
 

More from Ko 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 (6)

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

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 

Controlling your race with Micrometer and Spring Boot (live coding!)

  • 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) not slower then 8 seconds service x not longer then 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 x 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) 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)
  • 53. @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?
  • 54. @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?
  • 55. @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>

  • 56. @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>

  • 57.
  • 58. @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
  • 59. @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)
  • 61. @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?
  • 62. @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
  • 63. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Let’s deep dive into Grafana
  • 64. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Long Task Timer (duration)
  • 65. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Timer (count)
  • 66. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Timer (max)
  • 67. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Gauge
  • 68. @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Bindings
  • 69.
  • 70. @KoTurk77 @KoTurk77 The Battle of the IDEs #Devnexus @KoTurk77 Controlling your race with Micrometer and Spring Boot (2.x) Title Text
  • 71.
  • 72. All examples you can find at: https://github.com/KoTurk/micrometer-race-demo @KoTurk77 Thank you for listening