How to analyze NODEJS APM application performance


Analyze NODEJS APM


What is Node.js?

Node.js is a cross-platform, open-source server environment that can run on Windows, Linux, Unix, macOS, and more. Node.js is a back-end JavaScript runtime environment, running on the V8 JavaScript Engine, and executes JavaScript code outside a web browser.

Node.js lets developers use JavaScript to write command line tools and for server-side scripting. The ability to run JavaScript code on the server is often used to generate dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" paradigm, unifying web-application development around a single programming language, as opposed to using different languages for the server versus client-side programming.

Node.js has an event-driven architecture capable of asynchronous I/O. These design choices aim to optimize throughput and scalability in web applications with many input/output operations.

Node.js application instrumentation

The appservice-nodejs package along with a Node.js instrumentation library, collects performance metrics and errors from the application server. Depending on the chosen instrumentation library, it can have built-in support for the most popular frameworks and routers.

The APM library auto-instruments supported frameworks and records interesting events, like HTTP requests and database queries. To do this, it patches modules as they are loaded to capture when module functions and callbacks are called. Additionally, there are some cases where a module will be patched to allow tracing context to be propagated through the asynchronous continuation. This means that for the supported technologies, there are no code changes required.

The Agent automatically links module function calls to callback calls to measure their duration and metadata (like the DB statement), as well as HTTP related information (like the URL, parameters, and headers).

Node.js application traces monitoring

Resources are automatically created from this package after having deployed the ServicePilot Agent along with the proper Node.js APM library configuration. ServicePilot monitors HTTP(S) web requests from Node.js processes.

This gathers summarized statistics (min,max,avg...) per Node.js application such as:

  • Requests per minute
  • Sum of requests by HTTP return codes and methods
  • Number of requests in each response time range
  • Established vs. Timed-out requests

In order to provide deep Node.js application insights, details collected per request include:

  • Host and web page path
  • Server and client IP
  • Real User Response time
  • HTTP Return code and method
  • Client country and geolocation for public IPs

Requirements

  • A ServicePilot Agent needs to be installed and configured on the machine on which the Node.js application resides.
  • An Auto-provisioning rule with APM Collection enabled is required for the APM dashboards to show data provided by this package.

Installation

  • See SETTINGS > Configuration > Basic > Auto-provisioning for Automatic provisioning rules with APM intrumentation enabled.
  • See APM Instrumentation for assisted APM processes instrumentation under SETTINGS > Configuration > Basic > APM Instrumentation.

APM naming may be adapted based on your organization requirements using SETTINGS > Configuration > Basic > APM Naming.

Uninstallation

Local auto-instrumentation: Remove services from APM Instrumentation.
Central auto-instrumentation: Exclude the host from the APM intrumentation rules in Auto-provisioning or uninstall the ServicePilot Agent.

License

  • A ServicePilot Hosts Full-Stack license for the ServicePilot Agent configured from APM instrumentation.

How to install a appservice-nodejs resource?

  1. Use your ServicePilot OnPremise installation or a SaaS account.
  2. Add a new appservice-nodejs resource via the web interface (/prmviews or /prmresources) or via API (/prmpackages page), the default ServicePilot agent or another agent will be provisioned automatically.

Details of the appservice-nodejs package are located in the /prmpackages page of the software.

Benefits

ServicePilot enables you to deliver IT services faster and more securely with automated discovery and advanced monitoring features.

By correlating the technology NODEJS APM with APM and infrastructure monitoring, ServicePilot is able to provide a more comprehensive view of an organization's IT environment.

This allows IT teams to quickly identify and diagnose issues that may be impacting application performance, and take corrective action before end-users are affected.

Start with a free trial of our SaaS solution. Explore ourplans or contact us to find what works best for you.

Free installation in a few clicks