trace-nestjs
v2.0.0
Published
Allows adding tracing headers to associate request with log entries
Downloads
6,982
Readme
Trace Nest.js (Express.js) Request-Response Cycle
Adds X-Request-ID
and X-Response-ID
headers that allow context log entries using gc-json-logger
.
Installation
npm install --save \
gc-json-logger \
gc-json-logger-nestjs \
trace-nestjs
yarn add \
gc-json-logger \
gc-json-logger-nestjs \
trace-nestjs
OpenAPI
Usage
/* 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"}}