-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.stale
Description
Is your feature request related to a problem? Please describe.
Currently, a node process cannot receive and execute custom code after it has started. For monitoring tools, a common use case is to be able to attach to an arbitrary process, inject a (tracing) code, instruct the runtime to execute that, and optionally detach from the process.
Describe the solution you'd like
- define a mechanism to interrupt the runtime (signals in platforms where supported)
- specify a Javascript interface for the code injection:
- the signal is delegated to a Javascript handler function
- a module with a predefined name (such as
agent
) is loaded - a function with a predefined name (such as
execute
) is executed - a user can define this module and place it in the search path, prior to signalling
- upon completion, the module is unloaded
- define security restrictions (only requests from matching UID / GID allowed)
Describe alternatives you've considered
- modify the application and integrate with the monitoring tools
- define a specific function in the application that receives code at runtime
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.stale