Application Observability is a confusing space, between all the lingo (SRE, APMs, Tracing, Spans, etc) and technologies (Splunk, Datadog, Micrometer, etc), things often get implementing haphazardly with minimal focus on actual value.
We will cut through buzzwords and fads, and take a high level look at a typical Java Spring Boot / ReactJS Application and provide 11 Practical Developers Focused Tips on implementing and getting REAL value.
Simple, Easy (but often ignored) Strategies will be provided that you can immediately start applying on your project regardless of programming languages used.
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
8. CLIENT SIDE JAVASCRIPT ISSUES
TIP #4 - LOG JAVASCRIPT UNCAUGHT EXCEPTIONS
▸ Especially important for SPA’s (ReactJS)
▸ Send to Backend
▸ Include UserAgent
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
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”