Skip to content

Commit 7f8fd48

Browse files
authored
docs: update info on active branches; refresh the README (#3601)
1 parent efaec17 commit 7f8fd48

File tree

4 files changed

+93
-50
lines changed

4 files changed

+93
-50
lines changed

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ A release involves the following published artifacts:
209209
(The GitHub Actions CI "release" workflow will handle all the release
210210
steps -- including the `npm publish`. See the appropriate run at:
211211
https://github.com/elastic/apm-agent-nodejs/actions/workflows/release.yml)
212-
4. If this is the for the latest major (currently `3.x`), then reset the latest
212+
4. If this is the for the latest major (currently `4.x`), then reset the latest
213213
major branch to point to the current main, e.g.:
214-
`git branch -f 3.x main && git push origin 3.x`
214+
`git branch -f 4.x main && git push origin 4.x`
215215
(The periodic [docs CI job](https://elasticsearch-ci.elastic.co/view/Docs/job/elastic+docs+master+build/)
216-
uses this branch to update the [published docs](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-3.x.html).)
216+
uses this branch to update the [published docs](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html).)
217217
218218
If this is a new major release, then:
219219

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BSD 2-Clause License
22

33
Copyright (c) 2012, Matt Robenolt
44
Copyright (c) 2013-2014, Thomas Watson Steen and Elasticsearch B.V.
5-
Copyright (c) 2015-2022, Elasticsearch B.V.
5+
Copyright (c) 2015-2023, Elasticsearch B.V.
66

77
Redistribution and use in source and binary forms, with or without
88
modification, are permitted provided that the following conditions are met:

README.md

+86-45
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,120 @@
11
# Elastic APM Node.js Agent
22

3-
This is the official Node.js agent for [Elastic APM](https://www.elastic.co/solutions/apm).
3+
This is the official Node.js [application performance monitoring](https://www.elastic.co/observability/application-performance-monitoring)
4+
(APM) agent for the Elastic Observability solution. It is a Node.js package
5+
that runs with your Node.js application to automatically capture errors, tracing
6+
data, and performance metrics. APM data is sent to your Elastic Observability
7+
deployment -- hosted in [Elastic's cloud](https://www.elastic.co/cloud/) or in
8+
your own on-premises deployment -- where you can monitor your application,
9+
create alerts, and quick identify root causes of service issues.
410

5-
If you have any feedback or questions,
6-
please post them on the [Discuss forum](https://discuss.elastic.co/c/apm).
11+
If you have any feedback or questions, please post them on the
12+
[Discuss forum](https://discuss.elastic.co/tags/c/apm/nodejs).
713

814
[![npm](https://img.shields.io/npm/v/elastic-apm-node.svg)](https://www.npmjs.com/package/elastic-apm-node)
9-
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fapm-agent-nodejs-mbp%2F3.x)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/apm-agent-nodejs-mbp/job/3.x/)
15+
[![tests](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)](https://github.com/elastic/apm-agent-nodejs/actions/workflows/test.yml)
1016

1117

1218
## Installation
1319

1420
```
15-
npm install elastic-apm-node --save
21+
npm install --save elastic-apm-node
1622
```
1723

18-
## Quick start
24+
## Getting started
1925

20-
1. To run Elastic APM for your own applications,
21-
make sure you have the prerequisites in place first.
22-
This agent is compatible with [APM Server](https://github.com/elastic/apm-server) v6.5 and above.
23-
For support for previous releases of the APM Server,
24-
use version [1.x](https://github.com/elastic/apm-agent-nodejs/tree/1.x) of the agent.
25-
For details see [Getting Started with Elastic APM](https://www.elastic.co/guide/en/apm/get-started)
26+
First, you will need an Elastic Stack deployment. This is a deployment of APM
27+
Server (which receives APM data from the APM agent running in your application),
28+
Elasticsearch (the database that stores all APM data), and Kibana (the
29+
application that provides the interface to visualize and analyze the data). If
30+
you do not already have an Elastic deployment to use, follow [this APM Quick
31+
Start guide](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html)
32+
to create a free trial on Elastic's cloud. From this deployment you will need
33+
the APM **`serverUrl`** and **`secretToken`** (or a configured `apiKey`) to use
34+
for configuring the APM agent.
2635

27-
1. Now follow the documentation links below relevant to your framework or stack to get set up
36+
Next, the best and easiest way to see how to install and start the APM agent is to follow
37+
[one of the "Get started" guides](https://www.elastic.co/guide/en/apm/agent/nodejs/current/set-up.html)
38+
for the web framework or technology that you are using:
2839

29-
## Documentation
30-
31-
- [Table of contents](https://www.elastic.co/guide/en/apm/agent/nodejs)
32-
- [Introduction](https://www.elastic.co/guide/en/apm/agent/nodejs/current/intro.html)
3340
- [Get started with Express](https://www.elastic.co/guide/en/apm/agent/nodejs/current/express.html)
34-
- [Get started with hapi](https://www.elastic.co/guide/en/apm/agent/nodejs/current/hapi.html)
41+
- [Get started with Fastify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/fastify.html)
3542
- [Get started with Koa](https://www.elastic.co/guide/en/apm/agent/nodejs/current/koa.html)
43+
- [Get started with hapi](https://www.elastic.co/guide/en/apm/agent/nodejs/current/hapi.html)
3644
- [Get started with Restify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/restify.html)
37-
- [Get started with Fastify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/fastify.html)
38-
- [Get started with Lambda](https://www.elastic.co/guide/en/apm/agent/nodejs/current/lambda.html)
39-
- [Get started with a custom Node.js stack](https://www.elastic.co/guide/en/apm/agent/nodejs/current/custom-stack.html)
40-
- [Advanced Setup and Configuration](https://www.elastic.co/guide/en/apm/agent/nodejs/current/advanced-setup.html)
41-
- [API Reference](https://www.elastic.co/guide/en/apm/agent/nodejs/current/api.html)
42-
- [OpenTelemetry Bridge](https://www.elastic.co/guide/en/apm/agent/nodejs/current/opentelemetry-bridge.html)
43-
- [Custom Transactions](https://www.elastic.co/guide/en/apm/agent/nodejs/current/custom-transactions.html)
44-
- [Custom Spans](https://www.elastic.co/guide/en/apm/agent/nodejs/current/custom-spans.html)
45-
- [Metrics](https://www.elastic.co/guide/en/apm/agent/nodejs/current/metrics.html)
46-
- [Performance Tuning](https://www.elastic.co/guide/en/apm/agent/nodejs/current/performance-tuning.html)
47-
- [Source Map Support](https://www.elastic.co/guide/en/apm/agent/nodejs/current/source-maps.html)
48-
- [Supported Technologies](https://www.elastic.co/guide/en/apm/agent/nodejs/current/supported-technologies.html)
49-
- [Upgrading](https://www.elastic.co/guide/en/apm/agent/nodejs/current/upgrading.html)
50-
- [Troubleshooting](https://www.elastic.co/guide/en/apm/agent/nodejs/current/troubleshooting.html)
45+
- [Get started with AWS Lambda](https://www.elastic.co/guide/en/apm/agent/nodejs/current/lambda.html)
46+
- [Get started with Azure Functions](https://www.elastic.co/guide/en/apm/agent/nodejs/current/azure-functions.html)
47+
- [Get started with TypeScript](https://www.elastic.co/guide/en/apm/agent/nodejs/current/typescript.html)
48+
49+
Typically, the quick start steps are:
50+
51+
1. Install the APM agent package as a dependency:
52+
53+
```
54+
npm install --save elastic-apm-node
55+
```
56+
57+
2. Configure and start the APM agent. For the APM agent's automatic
58+
instrumentation of popular modules to work, it must be started **before your
59+
application imports its other dependencies**. For example, if you use
60+
CommonJS, then put this at the *very top* of your main application file:
61+
62+
```js
63+
require('elastic-apm-node').start({
64+
serverUrl: '<serverUrl from your Elastic Stack deployment>',
65+
secretToken: '<secretToken from your Elastic Stack deployment>'
66+
serviceName: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#service-name
67+
environment: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#environment
68+
});
69+
```
70+
71+
There are other ways to start the APM agent: for example, to support starting
72+
the APM agent without having to change application code; or to avoid certain
73+
surprises when using TypeScript or other transpilers like Babel or esbuild. See
74+
[Starting the agent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/starting-the-agent.html)
75+
for a reference of all ways to start the agent and for details on gotchas
76+
with transpilers and bundlers (like Webpack and esbuild).
77+
78+
If your application is using ES modules, please see [ECMAScript module support](https://www.elastic.co/guide/en/apm/agent/nodejs/current/esm.html)
79+
for the current *experimental* support.
80+
81+
82+
## Documentation
83+
84+
The full [Node.js APM agent documentation is here](https://www.elastic.co/guide/en/apm/agent/nodejs/current/intro.html).
85+
Some important links:
86+
87+
- [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.
88+
- [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).
89+
- [Configuration options](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html) is a full configuration reference.
90+
- [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.
91+
- [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.
92+
- [Metrics](https://www.elastic.co/guide/en/apm/agent/nodejs/current/metrics.html) describes the metrics that the APM agent automatically collects.
93+
- 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.
5194
5295
5396
## Active release branches
5497
55-
Currently the only active release branch is the
56-
["main" branch](https://github.com/elastic/apm-agent-nodejs/tree/main), which is
57-
used for 3.x versions.
98+
The following git branches are active:
99+
100+
- The ["main" branch](https://github.com/elastic/apm-agent-nodejs/tree/main) is being used for **4.x releases**.
101+
- 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 for 6 months](https://www.elastic.co/support/eol) after the release of v4.0.0.
58102
59103
60104
## Contributing
61105
62-
Contributions are welcome,
63-
but we recommend that you take a moment and read our [contribution guide](CONTRIBUTING.md) first.
106+
Contributions are very welcome. You can get in touch with us through our
107+
[Discuss forum](https://discuss.elastic.co/tags/c/apm/nodejs). If you have
108+
found an issue, you can open an issue at <https://github.com/elastic/apm-agent-nodejs/issues>.
64109
65-
To see what data is being sent to the APM Server,
66-
use the environment variable `ELASTIC_APM_PAYLOAD_LOG_FILE` (or the config option `payloadLogFile`) to specify a log file,
67-
e.g:
68-
69-
```
70-
ELASTIC_APM_PAYLOAD_LOG_FILE=/tmp/payload.ndjson
71-
```
110+
If you are considering contributing code to the APM agent, please read our
111+
[contribution guide](CONTRIBUTING.md).
72112
73113
Please see [TESTING.md](TESTING.md) for instructions on how to run the test suite.
74114
115+
75116
## License
76117
77118
[BSD-2-Clause](LICENSE)
78119
79-
<br>Made with ♥️ and ☕️ by Elastic and our community.
120+
<br>Made with ♥️ by Elastic and our community.

docs/supported-technologies.asciidoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Versions of Node.js past their end-of-life date are not supported.
2020

2121
image::./images/node_release_schedule.svg[Node.js release schedule]
2222

23-
The current APM agent version (3.x) works with Node.js versions back to v8.6. We will only break support for older Node.js versions with a major version release of the APM agent.
23+
APM agent 4.x releases work with Node.js versions 14.5.0 and later.
24+
APM agent 3.x maintenance releases work with Node.js versions 8.6 and later.
25+
We will only break support for older Node.js versions with a major version release of the APM agent.
2426

2527
[float]
2628
[[compatibility-esm]]

0 commit comments

Comments
 (0)