In plain words
Structured logs write each event as named fields, usually one JSON object per line, so you can filter, count and join them across services instead of reading sentences by eye.
Where you see it
A customer says their Pro upgrade failed around 09:40. Instead of scrolling, you filter Harbor's logs for event=checkout.failed and userId=u_8812, get three lines, and follow their shared requestId into the billing service's lines for the same request.
What goes wrong
- Sentences with the facts buried inside
A line like this can only be found by a lucky text search, and never counted. Put the event, the user and the error code in their own fields.
console.log(`User ${id} failed to upgrade: ${err.code}`); - A different field name in every service
Billing logs userId, the API logs user_id and the worker logs uid, so no single query finds one customer's trail. Agree on a short list of field names and use them everywhere.
- Logging everything at full volume, forever
Debug lines on every request at real traffic can cost more than the servers. Keep debug for investigations, log info for events that matter, and set how long each kind is kept.
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's billing logs say "Upgrade failed for user 8812 (card_declined)" as plain text. You want to know how many upgrades failed with card_declined in the last hour. What turns that into a one-line query?