Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
work around context loss with async-listener
[async-listener][1] is important module for APM tools and for long stack traces. Promises make the concept of a long-stack-trace ambiguous – as you can conceive the `then` callback as a continuation of either the resolution context or the context that queued the `then` callback ([more details][2]). async-listener defaults to the resolution context. This is the wrong default for how we are using promises here, resuling in APM tools like Stackdriver Trace losing context. We work-around the problem by not using the promise after it has resolved. [1]: https://www.npmjs.com/package/async-listener [2]: othiym23/node-continuation-local-storage#64
- Loading branch information