-
-
Save vdeturckheim/8361364ec9a795df7507def2e85673da to your computer and use it in GitHub Desktop.
This file contains 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
'use strict'; | |
const AsyncHooks = require('async_hooks'); | |
process.apm = process.apm || {}; | |
const Context = require('./context'); | |
const instrumentation = require('./instrumentation/index'); | |
const hook = AsyncHooks.createHook({ | |
init(asyncId, type, triggerAsyncId) { | |
Context.init(asyncId, type, triggerAsyncId); | |
}, | |
destroy(asyncId) { | |
Context.destroy(asyncId); | |
} | |
}); | |
hook.enable(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment