Created
September 17, 2019 16:42
-
-
Save arutnik/62ed2534374d2e8007e7b949e2371835 to your computer and use it in GitHub Desktop.
ARR Node Js Instrumenting example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createNamespace = require('cls-hooked').createNamespace; | |
const clsNamespace = createNamespace('mycomp'); | |
//... Create middleware that adds the incoming header value to clsNamespace | |
//... Run the below code during server start up | |
require('./http-instrumenter')(console, clsNamespace); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment