SlideShare a Scribd company logo
REAL-WORLD APPLICATION OBSERVABILITY
11 PRACTICAL DEVELOPER FOCUSED TIPS
Victor Szoltysek
SHORT TERM
VERSION TRACKING
TIP #1 - MAKE IT EASY TO IDENTIFY CURRENTLY DEPLOYED VERSIONS


▸ Human Readable Build Versions (1.3.101)


▸ Major / Minor (hot
fi
x) / Build Number


▸ JENKINS_BUILD_NUMBER /
GITHUB_BUILD_NUMBER


▸ Date / Time of Build


▸ GIT Hash


▸ GIT Branch


▸ Filename
plugins {


	
id 'org.springframework.boot' version '2.3.1.RELEASE'


	
id 'io.spring.dependency-management' version '1.0.9.RELEASE'


	
id "com.gorylenko.gradle-git-properties" version "2.2.2"


	
id 'java'


}


version = "1.0.${System.env.BUILD_NUMBER ?: System.env.GITHUB_RUN_NUMBER ?: '0-SNAPSHOT'}"


springBoot {


	
buildInfo()


}
GRADLE CODE
LIGHT-WEIGHT ALERTING
TIP #2 - ADD INCOMING WEBHOOKS


▸ Slack / Teams


▸ Developers Need Access


▸ CI Deployments and Failure Noti
fi
cations


▸ Separate “Bot” Channel
MEAN TIME TO DETECTION (MTTD)
TIP #3 - IMMEDIATELY ALERT ON SERIOUS ERRORS


▸ Logback.xml


▸ Filter on Errors


▸ Use a Custom Slack / Teams / Email Appender


▸ Fix Errors or change them to Warnings
<springProperty scope="context" name="APP_NAME" source="vcap.application.name"
defaultValue="local_app"/>


<springProperty scope="context" name="APP_SPACE" source="vcap.application.space_name"
defaultValue="${HOSTNAME}"/>


<appender name="SLACK" class="com.github.maricn.logback.SlackAppender">


<webhookUri>${SLACK_INCOMING_WEB_HOOK}</webhookUri>


<layout class="ch.qos.logback.classic.PatternLayout">


<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>


</layout>


<username>${APP_NAME}@${APP_SPACE}</username>


<iconEmoji>:rage:</iconEmoji>


</appender>


<appender name="ASYNC_SLACK" class="ch.qos.logback.classic.AsyncAppender">


<appender-ref ref="SLACK" />


<filter class="ch.qos.logback.classic.filter.ThresholdFilter">


<level>ERROR</level>


</filter>


</appender>
LOGBACK.XML CODE
CLIENT SIDE JAVASCRIPT ISSUES
TIP #4 - LOG JAVASCRIPT UNCAUGHT EXCEPTIONS


▸ Especially important for SPA’s (ReactJS)


▸ Send to Backend


▸ Include UserAgent
<script>


window.onerror = function(message, url, lineno, colno, error) {


$.post({


url: 'logging/client-error',


contentType: 'text/plain',


data: 'Source:' + url + ':' + lineno + ' Error:' +


message + ' UserAgent:’ + navigator.userAgent


});


}


</script>
JAVASCRIPT CODE
3RD PARTY FAILURES
TIP #5 - NOTIFY RELEVANT TEAMS OF 3RD PARTY DEPENDENCY FAILURES


▸ i.e. Communication Failures, Database Failures,
etc


▸ Filter on Speci
fi
c Error and create a Custom
Appender


▸ Automatically Email the Team Manager
MEDIUM TERM
SCALING OBSERVABILITY
TIP #6 - ADD CENTRALIZED LOGGING


▸ Prefer SaaS Solutions


▸ Warning on DIY (ELK)


▸ Give Team Access / Ownership


▸ Consider Appenders instead of “Agents”
BETTER LOG SEARCHABILITY
TIP #7 - PREFER STRUCTURED LOGS


▸ Indexed Key-Value Pairs


▸ Examples:


▸ env=prod


▸ error_code=COMM_FAILURE


▸ user_id=123


▸ trace_id=234234
DISTRIBUTED LOGGING
TIP #8 - LINK RELATED DISTRIBUTED CALLS WITH TRACEIDS


▸ Also know as Corelation-Ids


▸ Spring Cloud Sleuth
BETTER LOG SEARCHABILITY
TIP #9 - IMPROVE “SIGNAL-TO-NOISE” RATIO


▸ Logging can get slow and expensive quickly!


▸ Prune unused logging


▸ “Entering method / exiting” method


▸ Focus on Business Value / Exceptions


▸ Consider alternatives to logging for high
volume, aggregatable, and numerical data …
LONG TERM
SCALING OBSERVABILITY FURTHER
TIP #10 - USE CENTRALIZED METRICS


▸ Use Micrometer (like logback but metrics)


▸ Out of the Box Metrics


▸ Prefer SaaS Solutions (Datadog, Humio, etc)


▸ Warning on DIY (Prometheus)


▸ humio.io has a “free” version


▸ Give Developers Access / Ownership


▸ Understand the difference between Logging and
Metrics


▸ Not Meant for “High Cardinality”
Metrics.counter("sample.counter").increment();


//Example event - { "avg": 168.837394, "max": 213.738641, "name": "sample_timer",


//“count”: 5, "sum": 844.186968 } (after 5 calls)


Metrics.summary("purchase","product_name",


getRandomPurchaseName()).record(getRandomPurchaseAmount());


//Example event - { "avg": 40, "max": 61, "name": "purchase", "count": 2,


//“sum”: 80, "product_name": "House" } (after 2 random calls)
METRICS JAVA CODE
END

More Related Content

PDF
Real-World DevOps — 20 Practical Developers Tips for Tightening Your Operatio...
PDF
BSides Iowa 2018: Windows COM: Red vs Blue
PDF
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
PDF
Development tools at Base
PDF
Us 17-krug-hacking-severless-runtimes
PDF
Intro to DevOps
PDF
Ci/CD - Stop wasting time, Automate your deployments
PDF
Betabeers Android as a Digital Signage platform
Real-World DevOps — 20 Practical Developers Tips for Tightening Your Operatio...
BSides Iowa 2018: Windows COM: Red vs Blue
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Development tools at Base
Us 17-krug-hacking-severless-runtimes
Intro to DevOps
Ci/CD - Stop wasting time, Automate your deployments
Betabeers Android as a Digital Signage platform

Similar to Real-World Application Observability - 11 Practical Developer Focused Tips (20)

PPTX
drupal ci cd concept cornel univercity.pptx
PDF
WAF protections and bypass resources
ODP
Android crash debugging
PPTX
Using Behavior to Protect Cloud Servers
PDF
Gitlab, GitOps & ArgoCD
PDF
DevFest 2022 - Cloud Workstation Introduction TaiChung
PDF
VCS for Teamwork - GIT Workshop
PDF
The Best Feature of Go – A 5 Year Retrospective
PDF
Refactoring: the good, the bad and the ugly.
PPTX
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
PPTX
Zero to Continuous Delivery on Google Cloud
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
PDF
CI workflow in a web studio
PDF
Porting Rails Apps to High Availability Systems
PPTX
Google Cloud Build - Overview and Examples
PDF
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
PDF
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
PDF
Lecture 2 - C Programming.pdf
PPTX
Azure from scratch part 4
PDF
Simplified DevOps Bliss -with OpenAI API
drupal ci cd concept cornel univercity.pptx
WAF protections and bypass resources
Android crash debugging
Using Behavior to Protect Cloud Servers
Gitlab, GitOps & ArgoCD
DevFest 2022 - Cloud Workstation Introduction TaiChung
VCS for Teamwork - GIT Workshop
The Best Feature of Go – A 5 Year Retrospective
Refactoring: the good, the bad and the ugly.
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Zero to Continuous Delivery on Google Cloud
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
CI workflow in a web studio
Porting Rails Apps to High Availability Systems
Google Cloud Build - Overview and Examples
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Lecture 2 - C Programming.pdf
Azure from scratch part 4
Simplified DevOps Bliss -with OpenAI API
Ad

More from VictorSzoltysek (20)

PDF
Cloud for Grownups - 🛑 No Kubernetes, 🌀 No Complexity, ✅ Just AWS-Powered Res...
PDF
The Gold Jacket Journey - How I passed 12 AWS Certs without Burning Out (and ...
PDF
Java on AWS Without the Headaches - Fast Builds, Cheap Deploys, No Kubernetes
PDF
Demystifying GitHub Actions - Harnessing the power of automation to streamlin...
PDF
ChatGPT and Beyond - Elevating DevOps Productivity
PDF
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
PDF
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
PDF
From SpaceX Launch Pads to Rapid Deployments
PDF
The Future of JVM Languages
PDF
Driving Process Improvements - A Guided Approach to Running Effective Retrosp...
PDF
Spaceships, Pull Requests and Feature Branching - A Principles-Based approac...
PDF
Victor's Awesome Retro Deck
PDF
Software Development in Internet Memes
PDF
Big Bangs, Monorails and Microservices - Feb 2020
PDF
Making your RDBMS fast!
PDF
SQL Tips + Tricks for Developers
PDF
Less is more the 7 wastes of lean software development
PDF
Modern day jvm controversies
PDF
The Future of Java - and a look at the evolution of programming languages
PDF
Client Technical Analysis of Legacy Software and Future Replacement
Cloud for Grownups - 🛑 No Kubernetes, 🌀 No Complexity, ✅ Just AWS-Powered Res...
The Gold Jacket Journey - How I passed 12 AWS Certs without Burning Out (and ...
Java on AWS Without the Headaches - Fast Builds, Cheap Deploys, No Kubernetes
Demystifying GitHub Actions - Harnessing the power of automation to streamlin...
ChatGPT and Beyond - Elevating DevOps Productivity
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
From SpaceX Launch Pads to Rapid Deployments
The Future of JVM Languages
Driving Process Improvements - A Guided Approach to Running Effective Retrosp...
Spaceships, Pull Requests and Feature Branching - A Principles-Based approac...
Victor's Awesome Retro Deck
Software Development in Internet Memes
Big Bangs, Monorails and Microservices - Feb 2020
Making your RDBMS fast!
SQL Tips + Tricks for Developers
Less is more the 7 wastes of lean software development
Modern day jvm controversies
The Future of Java - and a look at the evolution of programming languages
Client Technical Analysis of Legacy Software and Future Replacement
Ad

Recently uploaded (20)

PPTX
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
PPTX
Primary and secondary sources, and history
PPTX
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
PPTX
The spiral of silence is a theory in communication and political science that...
PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPTX
_ISO_Presentation_ISO 9001 and 45001.pptx
PPTX
fundraisepro pitch deck elegant and modern
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
PPTX
chapter8-180915055454bycuufucdghrwtrt.pptx
PPTX
S. Anis Al Habsyi & Nada Shobah - Klasifikasi Hambatan Depresi.pptx
PPTX
Intro to ISO 9001 2015.pptx wareness raising
PPTX
lesson6-211001025531lesson plan ppt.pptx
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
PPTX
Anesthesia and it's stage with mnemonic and images
PPTX
Tablets And Capsule Preformulation Of Paracetamol
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
DOC
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
Primary and secondary sources, and history
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
The spiral of silence is a theory in communication and political science that...
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
_ISO_Presentation_ISO 9001 and 45001.pptx
fundraisepro pitch deck elegant and modern
Impressionism_PostImpressionism_Presentation.pptx
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
chapter8-180915055454bycuufucdghrwtrt.pptx
S. Anis Al Habsyi & Nada Shobah - Klasifikasi Hambatan Depresi.pptx
Intro to ISO 9001 2015.pptx wareness raising
lesson6-211001025531lesson plan ppt.pptx
Instagram's Product Secrets Unveiled with this PPT
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
Anesthesia and it's stage with mnemonic and images
Tablets And Capsule Preformulation Of Paracetamol
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
Emphasizing It's Not The End 08 06 2025.pptx
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证

Real-World Application Observability - 11 Practical Developer Focused Tips

  • 1. REAL-WORLD APPLICATION OBSERVABILITY 11 PRACTICAL DEVELOPER FOCUSED TIPS Victor Szoltysek
  • 3. VERSION TRACKING TIP #1 - MAKE IT EASY TO IDENTIFY CURRENTLY DEPLOYED VERSIONS ▸ Human Readable Build Versions (1.3.101) ▸ Major / Minor (hot fi x) / Build Number ▸ JENKINS_BUILD_NUMBER / GITHUB_BUILD_NUMBER ▸ Date / Time of Build ▸ GIT Hash ▸ GIT Branch ▸ Filename
  • 4. plugins { id 'org.springframework.boot' version '2.3.1.RELEASE' id 'io.spring.dependency-management' version '1.0.9.RELEASE' id "com.gorylenko.gradle-git-properties" version "2.2.2" id 'java' } version = "1.0.${System.env.BUILD_NUMBER ?: System.env.GITHUB_RUN_NUMBER ?: '0-SNAPSHOT'}" springBoot { buildInfo() } GRADLE CODE
  • 5. LIGHT-WEIGHT ALERTING TIP #2 - ADD INCOMING WEBHOOKS ▸ Slack / Teams ▸ Developers Need Access ▸ CI Deployments and Failure Noti fi cations ▸ Separate “Bot” Channel
  • 6. MEAN TIME TO DETECTION (MTTD) TIP #3 - IMMEDIATELY ALERT ON SERIOUS ERRORS ▸ Logback.xml ▸ Filter on Errors ▸ Use a Custom Slack / Teams / Email Appender ▸ Fix Errors or change them to Warnings
  • 7. <springProperty scope="context" name="APP_NAME" source="vcap.application.name" defaultValue="local_app"/> <springProperty scope="context" name="APP_SPACE" source="vcap.application.space_name" defaultValue="${HOSTNAME}"/> <appender name="SLACK" class="com.github.maricn.logback.SlackAppender"> <webhookUri>${SLACK_INCOMING_WEB_HOOK}</webhookUri> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern> </layout> <username>${APP_NAME}@${APP_SPACE}</username> <iconEmoji>:rage:</iconEmoji> </appender> <appender name="ASYNC_SLACK" class="ch.qos.logback.classic.AsyncAppender"> <appender-ref ref="SLACK" /> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> </appender> LOGBACK.XML CODE
  • 8. CLIENT SIDE JAVASCRIPT ISSUES TIP #4 - LOG JAVASCRIPT UNCAUGHT EXCEPTIONS ▸ Especially important for SPA’s (ReactJS) ▸ Send to Backend ▸ Include UserAgent
  • 9. <script> window.onerror = function(message, url, lineno, colno, error) { $.post({ url: 'logging/client-error', contentType: 'text/plain', data: 'Source:' + url + ':' + lineno + ' Error:' + message + ' UserAgent:’ + navigator.userAgent }); } </script> JAVASCRIPT CODE
  • 10. 3RD PARTY FAILURES TIP #5 - NOTIFY RELEVANT TEAMS OF 3RD PARTY DEPENDENCY FAILURES ▸ i.e. Communication Failures, Database Failures, etc ▸ Filter on Speci fi c Error and create a Custom Appender ▸ Automatically Email the Team Manager
  • 12. SCALING OBSERVABILITY TIP #6 - ADD CENTRALIZED LOGGING ▸ Prefer SaaS Solutions ▸ Warning on DIY (ELK) ▸ Give Team Access / Ownership ▸ Consider Appenders instead of “Agents”
  • 13. BETTER LOG SEARCHABILITY TIP #7 - PREFER STRUCTURED LOGS ▸ Indexed Key-Value Pairs ▸ Examples: ▸ env=prod ▸ error_code=COMM_FAILURE ▸ user_id=123 ▸ trace_id=234234
  • 14. DISTRIBUTED LOGGING TIP #8 - LINK RELATED DISTRIBUTED CALLS WITH TRACEIDS ▸ Also know as Corelation-Ids ▸ Spring Cloud Sleuth
  • 15. BETTER LOG SEARCHABILITY TIP #9 - IMPROVE “SIGNAL-TO-NOISE” RATIO ▸ Logging can get slow and expensive quickly! ▸ Prune unused logging ▸ “Entering method / exiting” method ▸ Focus on Business Value / Exceptions ▸ Consider alternatives to logging for high volume, aggregatable, and numerical data …
  • 17. SCALING OBSERVABILITY FURTHER TIP #10 - USE CENTRALIZED METRICS ▸ Use Micrometer (like logback but metrics) ▸ Out of the Box Metrics ▸ Prefer SaaS Solutions (Datadog, Humio, etc) ▸ Warning on DIY (Prometheus) ▸ humio.io has a “free” version ▸ Give Developers Access / Ownership ▸ Understand the difference between Logging and Metrics ▸ Not Meant for “High Cardinality”
  • 18. Metrics.counter("sample.counter").increment(); //Example event - { "avg": 168.837394, "max": 213.738641, "name": "sample_timer", //“count”: 5, "sum": 844.186968 } (after 5 calls) Metrics.summary("purchase","product_name", getRandomPurchaseName()).record(getRandomPurchaseAmount()); //Example event - { "avg": 40, "max": 61, "name": "purchase", "count": 2, //“sum”: 80, "product_name": "House" } (after 2 random calls) METRICS JAVA CODE
  • 19. END