To follow one request across orders-api and catalog-api on Light Cloud, give it a request ID, forward it in an x-request-id header, and include it in each service’s JSON log entries. The same ID in both Logs tabs lets you connect the events for a successful order or investigate a failed one.
What this workflow does—and what it does not
This tutorial applies to the Bean There microservices project and Light Cloud’s Logs tab. Each API keeps an incoming request ID or creates one, returns it in its response header, and records it in logs. When orders-api calls catalog-api, it forwards the same ID so the two services’ records can be searched together.
As an Amazon Associate I earn from qualifying purchases.
This is a way to correlate log entries for the example request. It is not evidence that the setup replaces a full distributed tracing system, and the tutorial does not describe propagation through asynchronous messages.
Recommended Free Tools
Prerequisites and source code
Start with the Bean There project from Parts 1–5. You need Git and a terminal with curl; in PowerShell 7 on Windows, use curl.exe. The code is in the tutorial-microservices repository at its part-6 tag: tutorial-microservices, part-6.
#1 Best Overall
Both APIs change in this installment, so redeploy orders-api and catalog-api before testing. The tutorial’s curl examples use placeholder deployment hostnames; replace them with the endpoint for your own deployment.
Establish a request ID at the service boundary
The example middleware in each service checks for x-request-id. If the header is present, the service keeps that value; if it is absent, the service creates a UUID. Each API adds the resulting ID to its response header, so a caller can obtain it from the response or from the first log entry.
For a production request that arrives without an ID, the first service should create it. Do not let a browser choose the ID. This keeps creation at the service boundary while allowing downstream services to use the same correlation value.
Forward the same ID between services
When orders-api calls catalog-api, it sends the ID in the downstream request’s x-request-id header. The catalog service retains that received ID instead of generating a new one. This continuity is what makes entries from the two APIs searchable as parts of one request.
Rank #3
Write structured log records
Each service writes one JSON object per line. Include the request ID, service name, severity, and message; the tutorial’s example fields are requestId, service, severity, and message. Light Cloud’s Logs tab reads severity to set the entry level and support its level filter.
The Python example in orders-api serializes the object, prints it, and flushes output. The JavaScript example in catalog-api serializes an object to the console. Keeping the fields consistent across the services makes it easier to recognize related entries, while the service and message fields explain what each entry records.
Rank #4
Follow a successful order in the Logs tabs
- Submit an order to the deployed
orders-apiusing the tutorial’s curl request, with your own deployment endpoint in place of the placeholder hostname. - Obtain the request ID from the response header or the first
orders-apilog entry. - Open the Light Cloud Logs tab for
orders-apiand search for that exact ID. - Open the Logs tab for
catalog-apiand search for the same ID.
The example’s related entries include messages such as “placing order,” “order placed,” and “reserved stock.” Their timestamps and shared request ID show the request’s path through the two services; the messages distinguish each service’s part in it.
Find and follow a failed request
The tutorial’s failure case submits an order for a product that does not exist. The API returns 404 Product not found. The example records a warning, and Light Cloud marks HTTP request logs with 4xx status codes as WARNING.
Best Value
- Develop Handwriting Skills with Complete Grooved Writing Books for Kids 3-5. Preschool learning toys packed with activities that engage hands-on learners, this 5-book set includes 2 magic pens, 10 disappearing ink refills, 2 soft pencil grips, and a sticker sheet. Ideal for screen-free entertainment and fine motor skill growth. Fun, learning toys for 4 year old for home use or classrooms, supporting early learning and creative self-expression.
- Spark Confidence with 48 Engaging Activities Across 5 Reusable Kids Books. Grooved Tracing Books for Kids Ages 3-5 feature letter tracing, counting, early math and word recognition. This spiral-bound set strengthens fine motor development while fostering STEAM learning through play. Perfect gifts for 5 year old girls or gifts for 3 year old boys that are ready to boost literacy skills at school, home, or during holiday breaks.
- Make Learning to Write Exciting Using Magic Pens with Disappearing Ink! Ideal 4 year old boy toys for sensory-friendly and neurodiverse learners. Grooved handwriting practice for kids 5-7 improves coordination and focus while enjoying calming, screen-free learning toys for 4+ year old children that’s great for quiet time, travel, or educational play. Thoughtful gifts for 5 year old girls or gifts for 4 year old boys that inspire writing practice and imagination development.
- Encourage Creativity and Skill Building with Magic Grooved Writing Practice for Kids Age 3-5. Features vivid pages, spiral binding, and left and right-hand accessibility. Designed for durability and comfort, this colorful writing practice set is a standout among Christmas gifts for grandkids and 4 year old girl birthday gifts. Ideal educational toys for 4 year old boys and girls for preschool classrooms or home settings, it blends learning with artistic expression to inspire young writers.
- Fun and Educational Christmas Gifts for Kids. These activity books for 3 year olds combine educational fun and writing skill growth in one engaging experience. Loved by parents and teachers, these Christmas gifts for girls and boys strengthen hand-eye coordination, support screen-free learning, and make Christmas, birthdays or back to school gifting easy. Add to Cart now to surprise a young learner with hours of joyful writing discovery!
- In the Logs tab for
orders-api, select the warnings-and-above filter to narrow the entries. - Open the warning entry for the failed request and note its request ID.
- Search for that same ID in the
catalog-apiLogs tab to inspect the related service entries.
The filter helps surface a warning, but the request ID is the link between the services. Searching the exact ID in both tabs lets you move from the failed order to the catalog-side record without relying on the message text alone.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




