BootUI
Try it
Setup
Features
Workshop
Properties
AI agents
Ecosystem
GitHub
Try it
Setup
Features
Workshop
Properties
AI agents
Ecosystem
GitHub
    • Try the sample app
    • Setup
    • Spring WebFlux
    • Quarkus
    • CI/CD and GitHub Actions
    • Java agent
    • Activation and safety
    • Non-standard runtimes
    • Troubleshooting
    • All features
    • Scorecard
    • Live Activity
    • Runtime Insights
    • Advisors
    • Runtime
    • Configuration
    • Database
    • Security
    • Services
    • Diagnostics
    • Java Agent
    • Developer tools
    • Workshop overview
    • 00 - Runtime understanding
    • 01 - Setup and tooling
    • 02 - Configuration and wiring
    • 03 - Runtime journal
    • 04 - Runtime Insights
    • 05 - Java instrumentation
    • 06 - Assessment and impact
    • 07 - Agent change loop
    • 08 - Going further
    • Participant worksheet
    • A - Prompts
    • B - Troubleshooting
    • C - Frameworks
    • D - Extensions
    • Properties
    • Framework support
    • AI agents
    • Command line
    • Framework-managed CI tests
    • CI reference
    • BootUI family
    • Known limitations
    • Architecture
    • REST API
    • Spring
    • Hibernate
    • Database
    • Security
    • Vulnerabilities
    • Memory
    • Pentesting
    • GraalVM readiness
    • CRaC readiness
    • Quarkus
    • Quarkus security
    • Repository
    • Specification
    • Roadmap
    • 2.0 design record
    • Try 2.0 early
    • v2 validation report
    • Releasing 2.0
    • Quarkus design notes
    • WebFlux design notes
  • Privacy

03 - Runtime journal

Time: 25 minutes. Goal: Measure the database work behind a correct order response.

Your source-level prediction now needs runtime evidence. Compare one original request with one control request before deciding whether the database work is necessary.

Generate a bounded workload

Use terminal 2 and the BOOTUI_URL established in Chapter 01, including any alternate port. Commands below use a POSIX shell:

printf 'Workshop application: %s\n' "$BOOTUI_URL"
curl -fsS "$BOOTUI_URL/api/insights/eager-orders"
curl -fsS "$BOOTUI_URL/api/insights/eager-orders/joined"

PowerShell equivalent:

Write-Output "Workshop application: $env:BOOTUI_URL"
Invoke-RestMethod "$env:BOOTUI_URL/api/insights/eager-orders" -ErrorAction Stop
Invoke-RestMethod "$env:BOOTUI_URL/api/insights/eager-orders/joined" -ErrorAction Stop

Prefer curl.exe on Windows if you want curl's flags; Windows PowerShell's curl alias can mean something else. Chapter 01's launch binds the sample to loopback. BootUI's guards alone would not restrict application fixture routes. These two requests read synthetic data and need no authentication.

Investigate one request

In Live Activity, select the journal source and filter to GET /api/insights/eager-orders. Open a profileable request. Record its request id, run id, duration, SQL count/groups, and correlation tiers.

Follow the SQL evidence into SQL Trace, Transactions, and any retained Exceptions or Log Tail. The original route normally prepares 17 SELECTs for 16 orders/customers; the joined control normally prepares one. The repository acceptance test allows small framework variation. Count the request's SELECTs, not all startup SQL.

Explain the N + 1

Original order request profile showing 17 Hibernate statements, request-linked timeline, and touched tables

Illustrative reference: inspect one request's SQL, transaction, and ORM evidence together, not all startup SQL.

The fixture has 16 orders with 16 distinct customers. The original request first loads the orders, then issues one secondary customer SELECT per order: 1 + 16 = 17 SELECTs. This is the N+1 pattern in this fixture. The response can still be correct; the problem is how much database work produces it.

Use the SQL shapes and Chapter 02's mapping/query to explain that extra work in your own words. The control's one SELECT and equivalent response are evidence that this response can be produced with fewer queries. This does not mean every eager relationship causes N+1, or that changing every relationship to lazy is a fix. You still need repeated samples and a safe change boundary.

BootUI assigns execution identities even when distributed tracing is unavailable. REQUEST_ID is a direct match; PROPAGATED will require the Java agent's executor sensor later. A heuristic fallback is not equally strong. Copying a trace id from unrelated work is not correlation.

Use the equivalent read-only CLI:

bootui activity --limit 50 --json
bootui request-profile '<actual-request-id>' --json

Replace the placeholder with a current REQUEST entry whose profileable is true. If no profile remains, pick a current request and read the retention reason; do not repeatedly retry an evicted id.

Side investigation: a failure behind HTTP 200

Spend at most five minutes on this separate fixture. Its lesson is that the HTTP result is only part of the evidence, just as a correct order response says nothing about its SQL cost. Do not add an import fix to your mission.

Send one deliberate synthetic mutation:

curl -fsS -X POST "$BOOTUI_URL/api/insights/orders/6/import"

PowerShell:

Invoke-RestMethod -Method Post "$env:BOOTUI_URL/api/insights/orders/6/import" -ErrorAction Stop

This fixture begins a transaction, writes, throws InsightImportException, rolls back, and is caught by the controller, which logs an ERROR and returns an accepted body with status 200. It is intentionally repeatable. The sample's /api/insights/** security configuration explicitly exempts this fixture from CSRF; this command is not a recipe for bypassing another application's authentication or CSRF.

Select the import request in Live Activity. Compare the response to transaction rollback and ERROR evidence. Follow an exception group when retained; its cause/detail can be in a shorter-lived panel buffer than the journal row. Explain why a successful curl exit does not mean a successful business operation.

Distinguish three retention windows

EvidenceLifetime/limit
Runtime journalBounded events and profiles; status exposes backlog, drops, and eviction
Panel buffersRich SQL/log/exception details can expire independently
Application run summaryPrior-run aggregate for comparison, not a full archive of every profile

Open Recording and record queue/dropped/evicted information. Do not clear the recording now: clearing also removes retained agent evidence and can invalidate later comparisons. Disabling a source panel hides its evidence. Persistence is optional and does not make the stream a production monitoring guarantee.

Checkpoint

Save two request ids and the import's HTTP/transaction/log result. Explain the strongest correlation tier and which information could disappear first. For the main investigation, write the original/control SQL counts and your explanation of the N + 1. Next, check whether that pattern survives repeated requests.

Optional: Use Copy for AI in a profile drawer, review the preview/omissions, and keep it locally. The button copies evidence; it does not send anything to a model.

Previous: 02 - Configuration and wiring. Next: 04 - Runtime Insights.

Prev
02 - Configuration and wiring
Next
04 - Runtime Insights

© 2026 Julien Dubois