{"id":13527210,"url":"https://github.com/elastic/apm-agent-nodejs","last_synced_at":"2025-04-23T20:57:43.538Z","repository":{"id":37545855,"uuid":"99673273","full_name":"elastic/apm-agent-nodejs","owner":"elastic","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-23T19:12:37.000Z","size":34335,"stargazers_count":587,"open_issues_count":342,"forks_count":231,"subscribers_count":264,"default_branch":"main","last_synced_at":"2025-04-23T20:57:16.585Z","etag":null,"topics":["apm","devops","distributed-tracing","error-monitoring","nodejs","performance-metrics","performance-monitoring","tracing"],"latest_commit_sha":null,"homepage":"https://www.elastic.co/guide/en/apm/agent/nodejs/current/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elastic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-08T09:07:27.000Z","updated_at":"2025-04-23T19:05:53.000Z","dependencies_parsed_at":"2023-09-27T15:29:36.174Z","dependency_job_id":"74e30b87-26ac-40bc-9548-ed6fde3f9be8","html_url":"https://github.com/elastic/apm-agent-nodejs","commit_stats":{"total_commits":3600,"total_committers":109,"mean_commits":"33.027522935779814","dds":0.5280555555555555,"last_synced_commit":"54cd2c3693b8c14cdf58a6fdd9d9af47ebafe31b"},"previous_names":[],"tags_count":175,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fapm-agent-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fapm-agent-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fapm-agent-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fapm-agent-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastic","download_url":"https://codeload.github.com/elastic/apm-agent-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apm","devops","distributed-tracing","error-monitoring","nodejs","performance-metrics","performance-monitoring","tracing"],"created_at":"2024-08-01T06:01:43.302Z","updated_at":"2025-04-23T20:57:43.481Z","avatar_url":"https://github.com/elastic.png","language":"JavaScript","readme":"# Elastic APM Node.js Agent\n\nThis is the official Node.js [application performance monitoring](https://www.elastic.co/observability/application-performance-monitoring)\n(APM) agent for the Elastic Observability solution. It is a Node.js package\nthat runs with your Node.js application to automatically capture errors, tracing\ndata, and performance metrics. APM data is sent to your Elastic Observability\ndeployment -- hosted in [Elastic's cloud](https://www.elastic.co/cloud/) or in\nyour own on-premises deployment -- where you can monitor your application,\ncreate alerts, and quick identify root causes of service issues.\n\nIf you have any feedback or questions, please post them on the\n[Discuss forum](https://discuss.elastic.co/tags/c/apm/nodejs).\n\n[![npm](https://img.shields.io/npm/v/elastic-apm-node.svg)](https://www.npmjs.com/package/elastic-apm-node)\n[![tests](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/apm-agent-nodejs/actions/workflows/test.yml)\n\n\n## Installation\n\n```\nnpm install --save elastic-apm-node\n```\n\n## Getting started\n\nFirst, you will need an Elastic Stack deployment. This is a deployment of APM\nServer (which receives APM data from the APM agent running in your application),\nElasticsearch (the database that stores all APM data), and Kibana (the\napplication that provides the interface to visualize and analyze the data). If\nyou do not already have an Elastic deployment to use, follow [this APM Quick\nStart guide](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html)\nto create a free trial on Elastic's cloud. From this deployment you will need\nthe APM **`serverUrl`** and **`secretToken`** (or a configured `apiKey`) to use\nfor configuring the APM agent.\n\nNext, the best and easiest way to see how to install and start the APM agent is to follow\n[one of the \"Get started\" guides](https://www.elastic.co/guide/en/apm/agent/nodejs/current/set-up.html)\nfor the web framework or technology that you are using:\n\n- [Get started with Express](https://www.elastic.co/guide/en/apm/agent/nodejs/current/express.html)\n- [Get started with Fastify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/fastify.html)\n- [Get started with Koa](https://www.elastic.co/guide/en/apm/agent/nodejs/current/koa.html)\n- [Get started with hapi](https://www.elastic.co/guide/en/apm/agent/nodejs/current/hapi.html)\n- [Get started with Restify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/restify.html)\n- [Get started with AWS Lambda](https://www.elastic.co/guide/en/apm/agent/nodejs/current/lambda.html)\n- [Get started with Azure Functions](https://www.elastic.co/guide/en/apm/agent/nodejs/current/azure-functions.html)\n- [Get started with TypeScript](https://www.elastic.co/guide/en/apm/agent/nodejs/current/typescript.html)\n\nTypically, the quick start steps are:\n\n1. Install the APM agent package as a dependency:\n\n    ```\n    npm install --save elastic-apm-node\n    ```\n\n2. Configure and start the APM agent. For the APM agent's automatic\n   instrumentation of popular modules to work, it must be started **before your\n   application imports its other dependencies**. For example, if you use\n   CommonJS, then put this at the *very top* of your main application file:\n\n    ```js\n    require('elastic-apm-node').start({\n        serverUrl: '\u003cserverUrl from your Elastic Stack deployment\u003e',\n        secretToken: '\u003csecretToken from your Elastic Stack deployment\u003e'\n        serviceName: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#service-name\n        environment: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#environment\n    });\n    ```\n\nThere are other ways to start the APM agent: for example, to support starting\nthe APM agent without having to change application code; or to avoid certain\nsurprises when using TypeScript or other transpilers like Babel or esbuild. See\n[Starting the agent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/starting-the-agent.html)\nfor a reference of all ways to start the agent and for details on gotchas\nwith transpilers and bundlers (like Webpack and esbuild).\n\nIf your application is using ES modules, please see [ECMAScript module support](https://www.elastic.co/guide/en/apm/agent/nodejs/current/esm.html)\nfor the current *experimental* support.\n\n\n## Documentation\n\nThe full [Node.js APM agent documentation is here](https://www.elastic.co/guide/en/apm/agent/nodejs/current/intro.html).\nSome important links:\n\n- [Release notes](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes.html)\n- [Supported Technologies](https://www.elastic.co/guide/en/apm/agent/nodejs/current/supported-technologies.html) describes the supported Node.js versions, which modules (and version ranges) are automatically traced, and other technologies.\n- [Configuring the agent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuring-the-agent.html) describes the different ways to configure the APM agent (via options to `apm.start(...)`, environment variables, or other mechanisms).\n- [Configuration options](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html) is a full configuration reference.\n- [Troubleshooting](https://www.elastic.co/guide/en/apm/agent/nodejs/current/troubleshooting.html) describes some common issues and a way to get debugging output from the APM agent for bug reports.\n- [Upgrading](https://www.elastic.co/guide/en/apm/agent/nodejs/current/upgrading.html) includes a guide for upgrading from each past major version of the APM agent.\n- [Metrics](https://www.elastic.co/guide/en/apm/agent/nodejs/current/metrics.html) describes the metrics that the APM agent automatically collects.\n- The APM agent includes an [OpenTelemetry Bridge](https://www.elastic.co/guide/en/apm/agent/nodejs/current/opentelemetry-bridge.html) that allows one to use the vendor-agnostic OpenTelemetry API for manual instrumentation in your application, should you require manual instrumentation.\n\n\n## Active release branches\n\nThe following git branches are active:\n\n- The [\"main\" branch](https://github.com/elastic/apm-agent-nodejs/tree/main) is being used for **4.x releases**.\n- The [\"3.x\" branch](https://github.com/elastic/apm-agent-nodejs/tree/3.x) is being used for **3.x maintenance releases**. The 3.x line will be [supported until 2024-03-07](https://www.elastic.co/support/eol) -- for 6 months after the release of v4.0.0.\n\n## Contributing\n\nContributions are very welcome. You can get in touch with us through our\n[Discuss forum](https://discuss.elastic.co/tags/c/apm/nodejs). If you have\nfound an issue, you can open an issue at \u003chttps://github.com/elastic/apm-agent-nodejs/issues\u003e.\n\nIf you are considering contributing code to the APM agent, please read our\n[contribution guide](CONTRIBUTING.md).\n\nPlease see [TESTING.md](TESTING.md) for instructions on how to run the test suite.\n\n\n## License\n\n[BSD-2-Clause](LICENSE)\n\n\u003cbr\u003eMade with ♥️ by Elastic and our community.\n","funding_links":[],"categories":["Repository","Packages","JavaScript"],"sub_categories":["Application Performance Monitoring (APM)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fapm-agent-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastic%2Fapm-agent-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fapm-agent-nodejs/lists"}