> ## Documentation Index
> Fetch the complete documentation index at: https://docs.germainux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Monitoring for NodeJS

> The Node.js application must be able to send monitoring telemetry to the configured GermainUX server.

Components
[`Engine`](https://docs.germainux.com/main/germain-ux-engine)
[`JS Profiler`](https://docs.germainux.com/main/germain-ux-js-profiler)
[`RPA Bot Recorder`](https://docs.germainux.com/main/germain-ux-rpa-bot-recorder)
[`RUM JS`](https://docs.germainux.com/main/germain-ux-rum-js)

Availability
2017.1 or later

> [card] [Requirements](#requirements)
>
> Pre-deployment checks

> [card] [Install the GermainUX Node.js Package](#3-install-the-germainux-node-js-package)
>
> Adding the package

> [card] [Identify the Application](#5-identify-the-application)
>
> Naming your app

> [card] [Validate the Deployment](#8-validate-the-deployment)
>
> Confirming telemetry arrives

**Deploy Monitoring for Node.js**

> [!NOTE]
>
> Deploy GermainUX monitoring into a Node.js application to capture application performance, HTTP transactions, errors, event-loop latency, resource utilization, and other Node.js telemetry.

## Requirements

Before deployment, verify:

* Node.js v14 or later
* npm or Yarn package management
* Network connectivity from the Node.js application to the GermainUX environment

The Node.js application must be able to send monitoring telemetry to the configured GermainUX server.

## 1. Start the Node.js Wizard

In Germain Workspace, navigate to:

Left Menu
Wizards
NodeJS

Start the Node.js monitoring deployment Wizard.

![Deploy Monitoring for NodeJS: 1. Start the Node.js Wizard](https://mintcdn.com/germain-ux/A5V4ExbdsH-e9Odt/images/main/node-js-monitoring-deployment/image-20230222-041716.png?fit=max\&auto=format\&n=A5V4ExbdsH-e9Odt\&q=85\&s=316f2afdee6537613947486c7c6e6882)

## 2. Configure the Monitored Application

Configure the Node.js environment you want to monitor.

Define:

* Monitored Server
* Application
* Name

Use consistent application naming so collected Node.js telemetry can be correctly associated with the application in GermainUX.

![Deploy Monitoring for NodeJS: 2. Configure the Monitored Application](https://mintcdn.com/germain-ux/A5V4ExbdsH-e9Odt/images/main/node-js-monitoring-deployment/image-20230222-041824.png?fit=max\&auto=format\&n=A5V4ExbdsH-e9Odt\&q=85\&s=dbd9cb1a363b0ce9b10336ed76628e10)

## 3. Install the GermainUX Node.js Package

The GermainUX Node.js monitoring package is:

`@germainapm/nodejs-monitoring`

### npm

Install using:

`npm i --save @germainapm/nodejs-monitoring`

### Yarn

Install using:

`yarn add @germainapm/nodejs-monitoring`

## 4. Initialize GermainUX Monitoring

Initialize GermainUX in the main JavaScript file used to start the Node.js application, such as:

`server.js`

### RequireJS

```javascript theme={null}
const GermainAPM = require('@germainapm/nodejs-monitoring');

const config = GermainAPM.getDefaultConfiguration('https://GERMAIN_APM_SERVER/');
const apm = new GermainAPM(config);
apm.start();
```

### ES6

```javascript theme={null}
import GermainAPM from '@germainapm/nodejs-monitoring';

const config = GermainAPM.getDefaultConfiguration('https://GERMAIN_APM_SERVER/');
const apm = new GermainAPM(config);
apm.start();
```

Replace `GERMAIN_APM_SERVER` with the GermainUX environment receiving the monitoring telemetry.

For the simplest deployment, only the GermainUX server URL is required. Standard monitoring capabilities are automatically configured.

## 5. Identify the Application

Optionally specify the application name when creating the default configuration:

```javascript theme={null}
const config = GermainAPM.getDefaultConfiguration(
    'https://GERMAIN_APM_SERVER/',
    'APP_NAME'
);
```

Application and component can also be configured separately:

```text theme={null}
config.defaults.application = {
    name: 'APP_NAME',
    component: 'APP_COMPONENT'
};
```

Use consistent application and component names across environments.

## 6. Review Data Collection & Privacy

Before production deployment, review the information collected from the Node.js application.

GermainUX supports:

* Masking
* Anonymization
* Exclusion

Configure exclusions for sensitive information before enabling monitoring broadly in production.

Pay particular attention to information associated with:

* HTTP requests
* Request bodies
* Session identifiers
* User information
* Authentication information
* Application-specific sensitive data

## 7. Restart the Node.js Application

Restart the application after installing and initializing the GermainUX monitoring package.

GermainUX monitoring starts when the application initializes the package and calls:

`apm.start()`

## 8. Validate the Deployment

Execute representative Node.js application activity.

For example:

Incoming HTTP Request
Node.js Processing
Outgoing HTTP Request
Response

Verify that GermainUX receives the expected telemetry, such as:

* HTTP transactions
* Errors and warnings
* Event-loop latency
* Node.js process resources
* OS resources
* Application startup
* Application events

Also verify that the application is associated with the correct server and application in GermainUX.

## Next Steps

Once Node.js monitoring is operational, configure:

* Monitoring frequency
* Asynchronous correlation
* Data distribution frequency
* Error monitoring
* HTTP monitoring
* Event-loop latency

> [accordion] Show all 9
>
> * Transactions
> * Process and OS resources
> * Privacy and exclusions

See **Configure Monitoring for Node.js** for detailed configuration.

## Get More Information

NodeJS environments can vary significantly depending on storefront customization, extensions, integrations, infrastructure, and security requirements.

The GermainUX team can help configure the appropriate monitoring scope, privacy controls, analytics, alerts, and automation for your NodeJS environment.

Please contact us [for any help.](https://docs.germainux.com/main/support.md)

## Get Help

> [card] [Contact GermainUX Support](https://docs.germainux.com/main/support.md)
>
> The GermainUX team helps you get up and running faster, empower your team, turn data into actionable insights, and optimize performance to deliver measurable business outcomes.

> [card] Can't find what you need?
>
> Search all GermainUX docs with **Ctrl + K**, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.