request-promise-lite
request-promise-lite copied to clipboard
Provide request id in log output
There are situations where many requests are run in parallel, then log output may become unclear on which logs refer to which request (especially when we deal with errors).
This patch ensures that logs of specific request can easily be recognized.
Coverage increased (+0.02%) to 97.81% when pulling 254f1ff2738bfd664801d69015a3e5258fd7339b on medikoo:request-ids-in-logs into 2d50c8ab09c93591e81a1f45229735be4fcca58f on laurisvan:master.
This one is interesting - indeed the requests might get entangled. I wonder if there were a way to inject case specific needs into the logs etc.
While there's nothing wrong in this one, I wonder if this will open Pandora's box for appending just about everything case-by-case to the requests...
Let me elaborate a bit on this one and get back to you shortly.
In MaaS projects we had cases where it's difficult to clearly deduct what comes from which requests, and it made debugging additionally cumbersome.
Here is an example of logs where it's no upfront clear what responses match what requests:
https://eu-west-1.console.aws.amazon.com/cloudwatch/home?region=eu-west-1#logEventViewer:group=/aws/lambda/maas-tsp-beta-booking-taxi-munich;stream=2018/03/20/%5B$LATEST%5Ddacd37fce90b42c48d6844ebe72f1786
Missing that information unfortunately increases debugging time on our side.