Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing module #570

Closed
davidmarkclements opened this issue Jan 23, 2015 · 9 comments
Closed

tracing module #570

davidmarkclements opened this issue Jan 23, 2015 · 9 comments

Comments

@davidmarkclements
Copy link
Member

So.. this has been removed

I had a play with it in v0.11 and thought it was promising,
the API was not good, and it wasn't immediately clear that it's only for tracing async calls,
but I thought the concept was interesting, you could extend it for javascript level
dtrace tooling, or possibly even use it to feed into kernel level tracing tools

So I've got two questions

  1. how come it was removed? (performance? ... philosophy? ... convenience? )

  2. will it (or some form of the same idea) make it back into core?

@kenany
Copy link
Contributor

kenany commented Jan 23, 2015

I think nodejs/node-v0.x-archive#8110 is the original PR that removed it?

@AndreasMadsen
Copy link
Member

I have read most of the conversation in nodejs/node-v0.x-archive#8110 and from what I can make out:

@trevnorris says: The hooks will remain accessible via process.binding('async_listener'), and
the added functionality will live in an external module.

However there don't appear to be an external module and process.binding('async_listener') throws Error: No such module: async_listener. (This is on io.js latest 804ab7e)

@bnoordhuis
Copy link
Member

Outdated comment, maybe. It's called async_wrap now:

$ iojs -p 'process.binding("async_wrap")'
{ setupHooks: [Function: setupHooks],
  Providers: 
   { NONE: 0,
     CARES: 1,
     CONNECTWRAP: 2,
     CRYPTO: 3,
     FSEVENTWRAP: 4,
     FSREQWRAP: 5,
     GETADDRINFOREQWRAP: 6,
     GETNAMEINFOREQWRAP: 7,
     PIPEWRAP: 8,
     PROCESSWRAP: 9,
     QUERYWRAP: 10,
     REQWRAP: 11,
     SHUTDOWNWRAP: 12,
     SIGNALWRAP: 13,
     STATWATCHER: 14,
     TCPWRAP: 15,
     TIMERWRAP: 16,
     TLSWRAP: 17,
     TTYWRAP: 18,
     UDPWRAP: 19,
     WRITEWRAP: 20,
     ZLIB: 21 } }

@davidmarkclements
Copy link
Member Author

thanks everyone

@AndreasMadsen
Copy link
Member

@bnoordhuis Thanks. Any information about the external module. I can only see that @tjfontaine have reserved the name on npm.

@Qard
Copy link
Member

Qard commented Jan 25, 2015

The code for that lives at http://github.com/joyent/node-tracing now, though it hasn't been getting a lot of attention lately.

@Fishrock123
Copy link
Member

probably needs to be sporked into iojs :)

@trevnorris
Copy link
Contributor

@bnoordhuis Thanks for clarifying.

Yes, it's under async_wrap (named after the main class that handles everything under the hood).

The idea was for add-on developers to use and experiment with new APIs so we could come to a conclusion of what the best API would be. Don't want another issue with creating a fundamentally broken API.

@davidmarkclements
Copy link
Member Author

makes sense to me, the tracing API was not ideal.

In my experiments I found combining it with Error.prepareStackTrace to get custom stacks with additional info and then creating a trace on every async op was interesting.

The context object being passed in the async listeners isn't a friendly API

This was referenced Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants