Skip to content

Instantly share code, notes, and snippets.

@arutnik
Created September 17, 2019 16:42
Show Gist options
  • Save arutnik/62ed2534374d2e8007e7b949e2371835 to your computer and use it in GitHub Desktop.
Save arutnik/62ed2534374d2e8007e7b949e2371835 to your computer and use it in GitHub Desktop.
ARR Node Js Instrumenting example
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