Gathering detailed insights and metrics for elastic-apm-node
Gathering detailed insights and metrics for elastic-apm-node
Gathering detailed insights and metrics for elastic-apm-node
Gathering detailed insights and metrics for elastic-apm-node
elastic-apm-node-opentracing
An OpenTracing bridge for the Elastic APM Node.js Agent
elastic-apm-node-logger
As of 25th Aug 2022, the official `elastic-apm-node` NPM library does not send the STDOUT logs of the nodejs application that it is installed on to back to your designated Elastic Stack, hence this NPM library aims to bridge this gap. it also enables your
@types/elastic-apm-node
Stub TypeScript definitions entry for elastic-apm-node, which provides its own types definitions
elastic-apm-node-with-metrics
The Elastic APM agent for Node.js with ability to read raw metrics.
npm install elastic-apm-node
Typescript
Module System
Min. Node Version
Node Version
NPM Version
83.6
Supply Chain
98.3
Quality
90.1
Maintenance
100
Vulnerability
92.2
License
JavaScript (97.73%)
Shell (1.64%)
TypeScript (0.37%)
Makefile (0.18%)
Dockerfile (0.08%)
Total Downloads
64,215,324
Last Day
85,785
Last Week
492,313
Last Month
1,793,092
Last Year
20,064,960
BSD-2-Clause License
587 Stars
3,839 Commits
230 Forks
264 Watchers
51 Branches
2,166 Contributors
Updated on Mar 26, 2025
Minified
Minified + Gzipped
Latest Version
4.11.2
Package Id
elastic-apm-node@4.11.2
Unpacked Size
907.84 kB
Size
235.19 kB
File Count
160
NPM Version
8.19.4
Node Version
16.20.2
Published on
Mar 18, 2025
Cumulative downloads
Total Downloads
Last Day
-4.4%
85,785
Compared to previous day
Last Week
13.4%
492,313
Compared to previous week
Last Month
17.6%
1,793,092
Compared to previous month
Last Year
37.9%
20,064,960
Compared to previous year
37
80
This is the official Node.js application performance monitoring (APM) agent for the Elastic Observability solution. It is a Node.js package that runs with your Node.js application to automatically capture errors, tracing data, and performance metrics. APM data is sent to your Elastic Observability deployment -- hosted in Elastic's cloud or in your own on-premises deployment -- where you can monitor your application, create alerts, and quick identify root causes of service issues.
If you have any feedback or questions, please post them on the Discuss forum.
npm install --save elastic-apm-node
First, you will need an Elastic Stack deployment. This is a deployment of APM
Server (which receives APM data from the APM agent running in your application),
Elasticsearch (the database that stores all APM data), and Kibana (the
application that provides the interface to visualize and analyze the data). If
you do not already have an Elastic deployment to use, follow this APM Quick
Start guide
to create a free trial on Elastic's cloud. From this deployment you will need
the APM serverUrl
and secretToken
(or a configured apiKey
) to use
for configuring the APM agent.
Next, the best and easiest way to see how to install and start the APM agent is to follow one of the "Get started" guides for the web framework or technology that you are using:
Typically, the quick start steps are:
Install the APM agent package as a dependency:
npm install --save elastic-apm-node
Configure and start the APM agent. For the APM agent's automatic instrumentation of popular modules to work, it must be started before your application imports its other dependencies. For example, if you use CommonJS, then put this at the very top of your main application file:
1require('elastic-apm-node').start({ 2 serverUrl: '<serverUrl from your Elastic Stack deployment>', 3 secretToken: '<secretToken from your Elastic Stack deployment>' 4 serviceName: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#service-name 5 environment: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#environment 6});
There are other ways to start the APM agent: for example, to support starting the APM agent without having to change application code; or to avoid certain surprises when using TypeScript or other transpilers like Babel or esbuild. See Starting the agent for a reference of all ways to start the agent and for details on gotchas with transpilers and bundlers (like Webpack and esbuild).
If your application is using ES modules, please see ECMAScript module support for the current experimental support.
The full Node.js APM agent documentation is here. Some important links:
apm.start(...)
, environment variables, or other mechanisms).The following git branches are active:
Contributions are very welcome. You can get in touch with us through our Discuss forum. If you have found an issue, you can open an issue at https://github.com/elastic/apm-agent-nodejs/issues.
If you are considering contributing code to the APM agent, please read our contribution guide.
Please see TESTING.md for instructions on how to run the test suite.
Made with ♥️ by Elastic and our community.
No vulnerabilities found.
Reason
all changesets reviewed
Reason
30 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-24
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More