Skip to content

Commit 644626a

Browse files
authored
Update README curl examples to correct API paths
1 parent 17e5294 commit 644626a

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

code/chapter09/payment/README.adoc

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
toc::[]
99

10-
This microservice demonstrates MicroProfile Telemetry 2.1 integrated with the LGTM observability stack (Loki, Grafana, Tempo, Prometheus) via an OpenTelemetry Collector. It is part of the Chapter 09 MicroProfile tutorial.
10+
This microservice demonstrates MicroProfile Telemetry 2.1 integrated with the LGTM observability stack (Loki, Grafana, Tempo, Mimir/Prometheus) via an OpenTelemetry Collector. It is part of the Chapter 09 MicroProfile tutorial.
1111

1212
The service processes payments with full fault tolerance (retry, fallback, circuit breaker, bulkhead, timeout) and exports **traces**, **metrics**, and **logs** over OTLP to the LGTM stack.
1313

@@ -530,25 +530,9 @@ Run the following to exercise all telemetry paths:
530530
curl -s -X POST "http://localhost:9080/payment/authorize?amount=75.50"
531531
532532
# 2. Full payment with card details (creates payment.process span)
533-
curl -s -X POST "http://localhost:9080/payment/payments" \
533+
curl -s -X POST "http://localhost:9080/payment/api/payments-config/process-example" \
534534
-H "Content-Type: application/json" \
535535
-d '{"cardNumber":"4111111111111111","cardHolderName":"Test User","expiryDate":"12/25","securityCode":"123","amount":99.99}'
536-
537-
# 3. Verification flow (validation → fraud check → funds check sub-spans)
538-
curl -s -X POST "http://localhost:9080/payment/verify" \
539-
-H "Content-Type: application/json" \
540-
-d '{"cardNumber":"4111111111111111","cardHolderName":"Test User","expiryDate":"12/25","securityCode":"123","amount":150.00}'
541-
542-
# 4. Trigger fraud check failure (card ending 0000)
543-
curl -s -X POST "http://localhost:9080/payment/verify" \
544-
-H "Content-Type: application/json" \
545-
-d '{"cardNumber":"4111111110000","cardHolderName":"Test User","expiryDate":"12/25","securityCode":"123","amount":50.00}'
546-
547-
# 5. Gateway health check (circuit breaker path)
548-
curl -s "http://localhost:9080/payment/health/gateway"
549-
550-
# 6. Async notification
551-
curl -s -X POST "http://localhost:9080/payment/notify/PAY-12345?recipient=ops@example.com"
552536
----
553537

554538
Run each command several times to produce enough data for Grafana to display.
@@ -564,7 +548,7 @@ Run each command several times to produce enough data for Grafana to display.
564548

565549
You should see recent traces. Click any trace to expand the span tree. Look for:
566550

567-
* Root HTTP span: `POST /payment/payments` or `POST /payment/verify`
551+
* Root HTTP span: `POST /payment/api`
568552
* Child span: `payment.process` with attributes `payment.amount`, `payment.method`, `payment.status`
569553
* For the verify flow: `validatePaymentDetails`, `performFraudCheck`, `verifyFundsAvailability`, `recordTransaction` steps appear as log events on the span
570554

0 commit comments

Comments
 (0)