动态跟踪的JavaScript:jstrace
jopen
10年前
动态跟踪的JavaScript,采用JavaScript开发。类似于dtrace, ktap等。为您提供深入了解你实时的NodeJS应用,在进程、机器或群集层面。动态跟踪的目标是提供一组丰富的调试信息,能够在生产中,帮助发现问题的根源。
特性:
- dynamic tracing :)
- local / remote execution support
- minimal overhead when idle
- flexible scripting capabilities
- probe name filtering
- pid, process title, and hostname filtering
- remote messaging for map/reduce style reporting
- multi-process support, inspect your cluster in realtime
- binds to
0.0.0.0:4322
(may need this for firewalls)
var trace = require('jstrace'); var http = require('http'); var ids = 0; var server = http.createServer(function(req, res){ var id = ++ids; trace('request:start', { id: id }); setTimeout(function(){ res.end('hello world'); trace('request:end', { id: id }); }, Math.random() * 250 | 0); }); server.listen(3000);