SlideShare a Scribd company logo
@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 GitOps
Weaveworks
 
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
Technology & Education
 
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
Publicis 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 components
Debora Gomez Bertoli
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023
Matthew 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 Maintenance
Igalia
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoring
Robert Munteanu
 
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
 
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
 
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
QAware 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 Security
Weaveworks
 
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 Projects
Phdtopiccom
 
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
Christian Deger
 
Eclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupadoEclipse MicroProfile para el desarrollador ocupado
Eclipse MicroProfile para el desarrollador ocupado
Ví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 Application
Mark 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 Production
Andreas Grabner
 
Building Twitter's SDKs for Android
Building Twitter's SDKs for AndroidBuilding Twitter's SDKs for Android
Building Twitter's SDKs for Android
Andy 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 Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)Cloud, Containers, Kubernetes (YOW Brisbane 2018)
Cloud, Containers, Kubernetes (YOW Brisbane 2018)
 
Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 2018)Cloud, Containers, Kubernetes (YOW Sydney 2018)
Cloud, Containers, Kubernetes (YOW Sydney 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 SpringBoot
Ko Turk
 
JCON - The Battle of the IDEs
JCON - The Battle of the IDEsJCON - The Battle of the IDEs
JCON - The Battle of the IDEs
Ko 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 IDEs
Ko 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 / Conspect
Ko Turk
 
The Battle of the IDEs
The Battle of the IDEsThe Battle of the IDEs
The Battle of the IDEs
Ko 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

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 

Recently uploaded (20)

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 

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