"INSTRUMENTING NODE.JS IN PRODUCTION"
summary
Shows how production Node tracing actually works: an agent is built by monkey-patching core and module bindings, using require-in-the-middle to wrap HTTP/DB drivers and the C-backed async_wrap hooks (shipped in Node 4 but not yet a stable API). Demoed a stats module that names transactions by route and prints DB traces, revealing lazy pool initialization that causes many queries on first request. Calls out real failures: console.log is async, timers coalesce identical handles, process.nextTick and Promises aren’t fully covered, and multiple async_wraps conflict.
AI-written summary · about
