Release: Phase 18b — Loki + promtail + Kafka UI - #79
Merged
Merged
Conversation
…18b)
Add common.OrderLog — the one place that knows the orderId/customerId MDC
field names — and stamp an orderId-tagged line in Payment (charge outcome,
PAID/CANCELLED transitions) and Reservation (reserve/confirm/release), so a
Loki line filter `{container="shopsphere-app"} |= "<orderId>"` returns every
module's leg of an order's journey. OrderPlacement refactored onto the helper.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ase 18b) Compose grows loki (:3100), promtail, and kafbat/kafka-ui (:8081) under the full profile. Promtail discovers the app container via the Docker socket and ships its JSON stdout to Loki verbatim (raw line, low-cardinality container label — query by line filter, not by orderId label). Grafana gains Loki as a second provisioned datasource beside Prometheus. Kafka UI browses topics, partitions, and consumer-group offsets. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Loki+promtail over ELK; query by line filter not high-cardinality label; one deep module (OrderLog) owns the correlation field; kafbat over Confluent Control Center. Books cited (PragProg, APoSD, PoEAA, XP). Records two honest limits: end-to-end Loki search is manual QA; "Outbox" coverage is the Ordering leg (Modulith's publication table, no app code to stamp). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 18b makes ShopSphere's logs and its broker legible, completing the observability pair started in 18a (metrics).
What shipped
common.OrderLogdeep module owns theorderId/customerIdMDC field names; Payment (charge outcome, PAID/CANCELLED) and Reservation (reserve/confirm/release) now stamporderIdonto their lines, so a Loki line filter{container="shopsphere-app"} |= "<orderId>"returns every module's leg of an order. Unit-tested viaOrderLogTests(logbackListAppender).fullprofile. Promtail tails the app container's JSON stdout into Loki; Grafana gains Loki as a second provisioned datasource; Kafka UI athttp://localhost:8081.Validation
mvn verifygreen — full Testcontainers suite (incl.DockerImageSmokeIT) plus the newOrderLogTests.docker compose configvalidates.Honest limits (in the ADR)
fullstack, walkthrough, paste theorderIdinto Grafana) — like 18a's "panels light up."Order placedis logged in the same transaction as the outbox insert, and the externalised event carriesorderId(visible in Kafka UI).Closes #63.