@americanairlines/controller-interceptor
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@americanairlines/controller-interceptor", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A simple interceptor for ExpressJs for logging/tracing purposes.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -5,3 +5,3 @@ # Controller Interceptor | ||
Controller Interceptor is a small Typescript package that allows you to intercept requests to an ExpressJS service and log the request info. Controller interceptor also attaches a trace id to the request headers. The trace id is implemented synchronously and does **not** use async-storage to avoid the performance impact created by other tracing libraries. | ||
Controller Interceptor is a small Typescript package that allows for the interception of requests made to an ExpressJS service. Controller interceptor also attaches a trace id to the request headers. The trace id is implemented synchronously and does **not** use async-storage. This is to avoid the performance impact caused by calling async storage. | ||
@@ -13,3 +13,3 @@ # Usage | ||
```bash | ||
$ npm i controller-interceptor | ||
$ npm i @americanairlines/controller-interceptor | ||
``` | ||
@@ -62,3 +62,3 @@ | ||
The trace ids are of the format `instanceId-requestId`. The instanceId is generated when the server starts, and the requestId is generated when the route is called. This allows for tracaing calls to specific routes as well as tracing requests to a specific instance of a service. | ||
The trace ids are of the format `X-Trace-Id`. The instanceId is generated when the server starts, and the requestId is generated when the route is called. This allows for tracaing calls to specific routes as well as tracing requests to a specific instance of a service. | ||
@@ -86,3 +86,3 @@ ### requestInfo | ||
You can pass options to the interceptor to change the way the trace ids are generated. | ||
You can pass options to the interceptor. | ||
@@ -89,0 +89,0 @@ ```javascript |
37414