-
-
Notifications
You must be signed in to change notification settings - Fork 149
Investigate: long stack traces support #57
Comments
Why do you mean by long stack traces? |
check out bluebird's "long stack traces". It has to do with being able to trace/inspect the entire async stack of operations that preceded an error. |
Ah, so something like what bluebird does, just put into asynquence. On Thu, Jul 28, 2016 at 7:09 AM, Kyle Simpson [email protected]
|
Early investigation shows that bluebird and when do this, and it would be at least 150 lines, probably around 250 - 300. |
Thank you for the estimates. I am partially concerned about "cost" (file size, perf) and partially concerned about the best way to configure it (per chain) -- default on or off? -- and also concerned about the best way to make the stack trace available. lots to think about. |
The cost is quite big. One way is to have it on according to environment variables. You could also add a |
Want this to work in browser too. So no on env vars. Should also investigate if there are other things that should be configurable per instance and if so, make sure we expose this config consistently. |
I now think the best way to do this would be to just provide a platform so that a monitor and reporter can be built in separate files. This will also allow people to make thier own monitoring functionality. This is what |
Do you have any links to read more about this? |
Perhaps a way to specify a listener on a sequence that is notified for each step, so someone else could hook into that from the outside and listen to an entire sequence, whether it's error or not. |
I got this from reading when's code. Relevant files: The main limit to doing this as a plugin is that plugins can't listen for events. Maybe we could add that? |
Basics are done now:
Output with lone trace:
With this code: var ASQ = require("./contrib/contrib.src.js");
try { ASQ.messages(); } catch (err) {
ASQ = ASQ( require("./asq.src.js") );
}
ASQ().then(function $$handle(done) {
setTimeout(function () {ASQ().then(handle).pipe(done); }, 100);
});
function handle(done) {
setTimeout(function $$timeout() {done.fail(new Error('Ahhh!'))}, 100);
} |
The method to do this adds 27 unminified lines to |
Full fork is here |
No description provided.
The text was updated successfully, but these errors were encountered: