POC: Generate tracing data
Closed this issue · 4 comments
Generate tracing data that can be used to reconstruct the history of asynchronous ops in node.
From Bert:
I’ve shared the loopback example with instrumented zones on google drive.
https://drive.google.com/a/strongloop.com/file/d/0BxdHVo2sqD0zSm9WSGhMSHlhRGs/view?usp=sharing
app.js now spits out events on the console
D:\loopback-example-app>node app.js
{"event":"create","id":1,"parentId":null,"name":"Root","time":140463057804034}
{"event":"enter","id":1,"time":140463058530749}
{"event":"create","id":5,"parentId":1,"name":"DebugServerZone","time":140463081900495}
{"event":"leave","id":1,"time":140463082457078}
{"event":"enter","id":5,"time":140463082670631}
{"event":"leave","id":5,"time":140463083951166}
{"event":"enter","id":1,"time":140463084166693}
{"event":"leave","id":1,"time":140463089698569}
....
.....
Zones are enabled. See http://strongloop.com/zone for more information.
Using the memory connector.
To specify another connector:
to capture and format the logs:
D:\loopback-example-app>node app.js 2> log
^C
D:\loopback-example-app>cat log | node pretty.js > pretty.html
D:\loopback-example-app>open pretty.html
responded back, i'm missing a package,
:whip: ? @piscisaureus
Small issue prevented it from working with node 0.10. Try https://drive.google.com/a/strongloop.com/file/d/0BxdHVo2sqD0zcUFPcFFYWXo4Y2c/view?usp=sharing