-
Notifications
You must be signed in to change notification settings - Fork 78
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
Node.js Collaboration Summit diagnostics discussion minutes #95
Comments
Hooks should simplify APM code, but there is no way to get context data ( The Embedder API now exists - it didn't at time of NINA Austin. It allows thirdparty modules to interact with the hooks to indicate "intent" and provides a uniform solution of the "connection pooling" aka "async queueing" problem (cf. https://docs.google.com/document/d/1tlQ0R6wQFGqCS5KeIw0ddoLbaSYx6aU7vyXOkv-wvlM/edit#). This is great, APMs look forward to this, it decreases the need for continuous adaption of our code bases to the changes in internals of thirdparty modules, because they can maintain their use of the Embedder API themselves. APM builders present:
Promises are problems, interaction with utask queue is hard to track, and we need to patch v8 promises and the bluebird promises (at least) Q: do/will hooks help with that? Mongo has an APM API so monkey-patching is not necessary, and they maintain the API themselves. This is a great pattern, perhaps we should more clearly advocate it as something that npm packages that want to support APM reporting can do, perhaps we can even advocate a specific API/API pattern. cf. http://mongodb.github.io/node-mongodb-native/2.0/reference/management/apm/ elasticsearch may get an APM API soon (according to @watson) Maybe we can get some common push behind an API for this, and put out a blog We can could work on this by PRing a guide. We should start talking about it in the diagnostics meetings. V8: does it have js APIs? Does it have levels? Is the timing of it acceptable,
async hooks: |
I wish I could have attended this! Just to speak quickly to:
I recently worked with the V8 team and @trevnorris to have Promise Hooks (interface, design doc) added to V8 so that async hooks can observe promise lifecycles. I have also prototyped an integration of these promise hooks into async hooks but we decided to wait to add this support until the existing async hooks PR lands as it is already quite complex. So, I guess the answer is hopefully async hooks should help once the initial implementation + promise hook integration follow-on have both landed. |
It was daniel khan, dynatrace :) I would prefer more of a standard over a blog. It can live under /guides on the Node.js website. I can think of a blog post that describes the problems APM vendors are facing today, though. This would give us something to pass on to customers to baseline their expectations when it comes to Node monitoring. I could sketch something vendor neutral out for you to review, ok? |
@danielkhan Sorry Daniel! Updated. I agree, a guide makes more sense (with a blog to point out its existence) |
Guide + intro blog with pointer was what we settled on in the discussions. |
As you all were discussing this topic last week (and I sadly couldn't join!) we were busy at Microsoft preparing https://github.com/Microsoft/node-diagnostic-channel for use with a couple of our APM-like products. Take a look at the README, particularly the Why section; I think the diagnostic-channel project may be a good start to addressing the problems discussed here. We're open to developing it further with your help. Also, I think it would be a small step to integrate diagnostic-channel with trace_events, particularly with the help of @jasongin's JS Tracing API proposal. That would enable us to experiment with both a) sending diagnostic messages to diagnostic-channel directly, and b) sending them to trace_events and then to diagnostic-channel. |
Per discussion in Diag WG Meeting on 2017-12-13, we decided to open a seperate issue (#134) to track the latter issue here ("Can we standardise the way tracing information is sent from an instrumented module"), and we decided to close this one. Plz re-activate If something else in this thread is lost & needs tracked. |
These are my raw notes taken at the Node.js Collaboration Summit in Berlin. Sorry for the mess 😅. I'll update when new stuff comes up. Feel free to add stuff I missed 😃
Day 1: 2017-05-04
Problem: How do we make it easier for APM vendors to instrument node-core and userland modules without having to monkey-patch everything (even after AsyncHooks lands)?
Suggestion: We need to make it easier for module owners to know how to structure and build their modules so they are easier to instrument. We can make a guide on https://nodejs.org/en/docs/guides/ that specifies how module owners should make their modules easy to instrument.
Topic ideas:
Other notes:
Problem: Can we standardise the way tracing information is sent from an instrumented module (called module-x below) to an APM agent?
Suggestions:
The text was updated successfully, but these errors were encountered: