Spring Boot startup time: bean-by-bean diagnosis, and one directory per post
Adds spring-boot-startup-time/, the companion project for BLOG-618: a runnable Spring Boot 4.1.1 application on JDK 25 that installs BufferingApplicationStartup and FlightRecorderApplicationStartup behind a system property, and a /diag/startup endpoint that computes step self time -- the number /actuator/startup does not give you and the one that names the actual culprits. Captured under docs/output/: the step tree sorted both ways, the same startup as JFR events, a +5000-class experiment putting 0.11 ms per scanned class on the classpath scan tax, the silent truncation a 2048-step buffer performs, and JDK 25 AOT cache timings (6.93 s to 4.82 s). Post body and metadata live in post/. Moves the existing Actuator project into actuator-in-production/ so the repository holds one directory per article; the root README is now an index.
This commit is contained in:
22
actuator-in-production/scripts/demo-default-exposure.sh
Executable file
22
actuator-in-production/scripts/demo-default-exposure.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# What Actuator exposes when you add the starter and configure nothing.
|
||||
set -uo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=docs/output/01-default-exposure.txt
|
||||
{
|
||||
echo "### Spring Boot Actuator, starter added, ZERO management.* configuration"
|
||||
echo
|
||||
echo "\$ curl -s -u ops:ops-password http://localhost:8080/actuator"
|
||||
curl -s -u ops:ops-password http://localhost:8080/actuator | python3 -m json.tool
|
||||
echo
|
||||
echo "\$ curl -s -o /dev/null -w '%{http_code}' -u ops:ops-password http://localhost:8080/actuator/env"
|
||||
curl -s -o /dev/null -w '%{http_code}\n' -u ops:ops-password http://localhost:8080/actuator/env
|
||||
echo " 404 = discovered but NOT exposed over HTTP. Exposure and existence are different things."
|
||||
echo
|
||||
echo "\$ curl -s -u ops:ops-password http://localhost:8080/actuator/health"
|
||||
curl -s -u ops:ops-password http://localhost:8080/actuator/health | python3 -m json.tool
|
||||
echo
|
||||
echo " Only 'health' is web-exposed by default. show-details defaults to 'never', so even an"
|
||||
echo " authenticated caller sees a bare status until you say otherwise."
|
||||
} > "$OUT" 2>&1
|
||||
echo "wrote $OUT"
|
||||
Reference in New Issue
Block a user