Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
The function for returning trace-enabled functions for functions with over 9 arguments (the 'default' case for generateF) was not returning anything usable. During testing I discovered that using a function with no arguments returned the same trace data as using a function with a specified number of arguments. It seems node doesn't care how many arguments you pass a function unless specific arguments are used in the body of the function, which we're not doing - we're just passing the entire arguments list. Therefore a single function with no parameters takes care of all cases.
Tested by writing a sample web app which calls a module function with 5 args that was traced, and confirmed that exactly the same trace data came back using the generateF 5 arg function, and the no-arg function.
Fix for issue #601
The function for returning trace-enabled functions for functions with over 9 arguments (the 'default' case for
generateF
) was not returning anything usable. During testing I discovered that using a function with no arguments returned the same trace data as using a function with a specified number of arguments. It seems node doesn't care how many arguments you pass a function unless specific arguments are used in the body of the function, which we're not doing - we're just passing the entirearguments
list. Therefore a single function with no parameters takes care of all cases.Tested by writing a sample web app which calls a module function with 5 args that was traced, and confirmed that exactly the same trace data came back using the
generateF
5 arg function, and the no-arg function.