# ibmapm-embed

> Node.js data collector for IBM BAM

Latest version **21.9.0** (published 2021-09-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ibmapm-embed
pnpm add ibmapm-embed
yarn add ibmapm-embed
bun add ibmapm-embed
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 21.9.0 |
| Published | 2021-09-13 |
| First published | 2018-03-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 479.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Yue Chen |
| Maintainers | yuecchen, songhj, shiyanfeng, dpdpbj |
| Keywords | appmetrics, apm, ibm, performance, monitoring |

## Links

- npm: https://www.npmjs.com/package/ibmapm-embed
- Repository: https://github.com/IBM/node-ibmapm-embed
- Homepage: https://github.com/IBM/node-ibmapm-embed#readme
- Issues: https://github.com/IBM/node-ibmapm-embed/issues
- npm.io page: https://npm.io/package/ibmapm-embed

## Dependencies (10)

- [uuid](https://npm.io/package/uuid.md) ^2.0.2
- [log4js](https://npm.io/package/log4js.md) ^4.5.1
- [zipkin](https://npm.io/package/zipkin.md) 0.10.1
- [tcp-ping](https://npm.io/package/tcp-ping.md) ^0.1.1
- [node-fetch](https://npm.io/package/node-fetch.md) >=1.4.0 <3.0.0
- [properties](https://npm.io/package/properties.md) ^1.2.1
- [ibmapm-restclient](https://npm.io/package/ibmapm-restclient.md) >=20.3.0
- [properties-reader](https://npm.io/package/properties-reader.md) 2.2.0
- [zipkin-context-cls](https://npm.io/package/zipkin-context-cls.md) 0.6.1
- [zipkin-transport-http](https://npm.io/package/zipkin-transport-http.md) 0.22.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 21.9.0 (latest) — 2021-09-13
- 20.8.4 — 2020-10-01
- 20.8.3 — 2020-09-27
- 20.8.2 — 2020-09-25
- 20.8.1 — 2020-09-17
- 20.8.0 — 2020-09-16
- 20.3.0 — 2020-04-01
- 19.12.1 — 2019-12-09
- 19.12.0 — 2019-12-09
- 19.9.1 — 2019-09-29
- 19.9.0 — 2019-09-29
- 19.6.2 — 2019-07-05
- 19.6.1 — 2019-06-24
- 19.6.0 — 2019-06-24
- 1.1.2 — 2019-05-08
- … 50 more at https://npm.io/package/ibmapm-embed/versions

## README

Table of Contents
=================
- [Table of Contents](#table-of-contents)
    - [Overview](#overview)
    - [The latest ibmapm package](#the-latest-ibmapm-package)
    - [Configuring the Node.js application monitoring using the Cloud App Management server](#configuring-the-nodejs-application-monitoring-using-the-cloud-app-management-server)
        - [Monitoring Node.js applications in IBM Cloud Private](#monitoring-nodejs-applications-in-ibm-cloud-private)
        - [Monitoring Microclimate based Node.js applications in IBM Cloud Private](#monitoring-microclimate-based-nodejs-applications-in-ibm-cloud-private)
        - [Monitoring on-premises Node.js applications](#monitoring-on-premises-nodejs-applications)
        - [Disabling the Node.js data collector](#disabling-the-nodejs-data-collector)
    - [Configuring Node.js application monitoring using the Cloud APM v8 server](#configuring-nodejs-application-monitoring-using-the-cloud-apm-v8-server)
    - [Troubleshooting](#troubleshooting)    

## Overview
The Node.js data collector can provide you with visibility and control of your Node.js applications, and help you ensure optimal performance and efficient use of resources. You can reduce and prevent application crashes and slowdowns around the clock, as the data collector assists you in detecting, diagnosing and isolating performance issues.

The Node.js data collector helps you to manage the performance and availability of the following:

- Node.js applications in IBM Cloud Private
- Node.js applications in IBM Cloud (aka Bluemix)
- Local Node.js applications

This data collector can be configured to connect to the Cloud App Management server, or the IBM Cloud Application Performance Management (Cloud APM v8) server.

## The latest ibmapm package
The Node.js data collector is published to npm already. You can find it in [ibmapm](https://www.npmjs.com/package/ibmapm).


## Configuring the Node.js application monitoring using the Cloud App Management server
When the data collector is configured to connect to the Cloud App Management server, you can use it to monitor both the Node.js applications in IBM Cloud Private and on-premises Node.js applications.

### Monitoring Node.js applications in IBM Cloud Private

To monitor a Node.js applications running as a container in IBM Cloud Private, follow the instructions as documented in [Configuring the data collector for applications in IBM Cloud Private](readme-topics/nodejsdc_config_winterfell_container.md)

### Monitoring Microclimate based Node.js applications in IBM Cloud Private

To monitor a Node.js applications which created by Microclimate running as a container in IBM Cloud Private, follow the instructions as documented in [Configuring the data collector for Microclimate based applications in IBM Cloud Private](readme-topics/nodejsdc_config_winterfell_container_microclimate.md)

### Monitoring on-premises Node.js applications
To monitor on-premises Node.js applications, follow the instructions as documented in [Configuring on-premises Node.js applications monitoring using the Cloud App Management server](readme-topics/nodejsdc_config_winterfell_onpremise.md).

You can also use the supported variables to change the default behavior of data collection. For more information, see [Advanced configuration](readme-topics/nodejs_dc_advanced_config.md).

### Disabling the Node.js data collector
To disable the Node.js data collector, roll back the changes that you have made to your application and then update the application deployment. For more information, see [Disabling the Node.js data collector](readme-topics/nodejs_dc_unconfig.md).

## Configuring Node.js application monitoring using the Cloud APM v8 server
You can configure the Node.js data collector using the Cloud APM v8 server to monitor your Node.js applications running locally or in IBM Cloud Private.

### Prerequisites
Before configure the Node.js DC to connect to the Cloud APM v8 server, you need to get the configuration information from APM server first, see [Get the APM configuration information](readme-topics/nodejs_dc_apm_configure.md).

- If you are a Cloud APM, Private (on-premises) user, complete the following procedures:
> - [Configuring the data collector for local applications](readme-topics/nodejsdc_config_apm_onpremise.md)
> - [Configuring the data collector for applications in IBM Cloud Private](readme-topics/nodejsdc_config_apm_icp.md)
> - [Configuring method trace and transaction tracking](readme-topics/nodejsdc_mt_tt.md)

You can also use the supported variables to change the default behavior of data collection. For more information, see [Advanced configuration](readme-topics/nodejs_dc_advanced_config.md).

## Troubleshooting
Find below some possible problem scenarios and corresponding diagnostic steps. 
### Multiple versions of Node Application Metrics are being initialized.

```
AssertionError [ERR_ASSERTION]: Multiple versions of Node Application Metrics are being initialized.
This version 3.1.3 is incompatible with already initialized
version 4.0.0.
```
This error indicates there are multiple versions of Node Application Metrics are being installed in your application. The appmetrics version 4.0.0 or later is required for Node.js data collector.
If your application requires the module such as: appmetrics-dash, appmetrics-prometheus or appmetrics-zipkin which require the appmetrics, please make sure these modules has right version which requiring the appmetrics 4.0.0 or later.
```
"appmetrics-dash": "^4.0.0",
"appmetrics-prometheus": "^2.0.0",
"appmetrics-zipkin": "^1.0.4",
```

### New version of Node Application Metrics are using by application.

```
AssertionError [ERR_ASSERTION]: New version of Node Application Metrics are using by application.
This version 4.*.* is incompatible with already initialized
version 4.0.1.
```
If you are using greenfield ibmapm in your application, and your application is using a higher version of appmetrics, you will find this error.  
you need to delete the appmetrics folder in ./ibmapm/node_modules (it is v4.0.1), so that the latest version in your application could be used.
```
rm -rf ./ibmapm/node_modules/appmetrics
```

---
_Source: https://npm.io/package/ibmapm-embed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
