Grokking Advanced Go
Vote

0% completed

​

Logging and Metrics for Services

The program below logs one failed request in two ways. Both lines report the same failure, and only one of them helps someone who is searching for it among many others.

Output:

error creating order: store: connection refused level=ERROR msg="request failed" request_id=req-7f3a route="POST /orders" status=500 customer=Ana error="store: connection refused"

The first line says that something failed. The second says which request, which route, and which customer, in fields that a log system can filter

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content