Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Where do we want to put the hooks? #13

Open
3 tasks
benjamingr opened this issue Jul 26, 2018 · 4 comments
Open
3 tasks

Where do we want to put the hooks? #13

benjamingr opened this issue Jul 26, 2018 · 4 comments

Comments

@benjamingr
Copy link
Member

Given the work on #8 that @devsnek is working on implementing in Node now - we need to figure out a place to put this hook (and the other ones that will hopefully be coming).

We should think where we want to put this hook as well as other hooks that will be related to engine hooks and hooks related to debugging.

  • Decide on alternatives for where we want to put the hook.
  • Create a document explaining those alternatives and how it'll be used briefly.
  • Crease a presentation and present it to the TSC

@nodejs/promises-debugging - ideas are welcome. Just to start the bikeshedding:

const engineHooks = require('engine_hooks'); // please suggest a name?
hooks.on('promiseEvent', e => {
  if (e.name === 'PROMISE_EVENT_NAME') {
    instrumentation.log(e);
  }
});

Should different hooks be different events?

@misterdjules
Copy link
Contributor

Isn't the discussion already happening in nodejs/node#21857? Why duplicate that discussion here?

@benjamingr
Copy link
Member Author

benjamingr commented Jul 26, 2018

@misterdjules well, basically we like moving the conceptual discussion away from pull request and keep the technical discussion there. It also has a broader scope than just that PR and will have to go through the TSC themselves.

It can also happen in nodejs/node (in an issue) if you prefer or elsewhere.

@misterdjules
Copy link
Contributor

I'm concerned that having this discussion in two different places is going to add to the confusion both here and in nodejs/node, without necessarily having any clear benefit. The conceptual discussion can happen in nodejs/node.

It also has a broader scope than just that PR

It's not clear to me how the scope of this issue is bigger than the scope of nodejs/node#21857

and will have to go through the TSC themselves

Do you mean that conversations that might escalate to the TSC cannot happen in nodejs/node?

@mhdawson
Copy link
Member

In terms of not wanting in on process, I'm wondering some of the reasons why not? It seems to be along the same lines as the uncaught exception event.

I guess I'm just starting the conversation of what you suggested we document. So +1 to that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants