Adds X-Request-ID
and X-Response-ID
headers that allow context log entries using gc-json-logger
.
npm install --save \
gc-json-logger \
gc-json-logger-nestjs \
trace-nestjs
yarn add \
gc-json-logger \
gc-json-logger-nestjs \
trace-nestjs
/* reduced logs */
{"message":"POST /","logging.googleapis.com/operation":{"id":"016a575d-39cf-4a3a-b99d-91341c42aa31"}}
{"message":"do work","logging.googleapis.com/operation":{"id":"016a575d-39cf-4a3a-b99d-91341c42aa31"}}
{"message":"201 POST /trace (4ms)","logging.googleapis.com/operation":{"id":"016a575d-39cf-4a3a-b99d-91341c42aa31"}}