Skip to content

Commit

Permalink
3.50.0 (#3616)
Browse files Browse the repository at this point in the history
This is the first 3.x release as a *maintenance* branch.
  • Loading branch information
trentm authored Sep 7, 2023
1 parent 7f8fd48 commit 9167a43
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 39 deletions.
7 changes: 1 addition & 6 deletions .ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ create-arn-file: validate-release-notes-url
@RELEASE_NOTES_URL=$(RELEASE_NOTES_URL) ./scripts/create-arn-table.sh

github-release: validate-ref-name
@gh release list
@gh \
release \
create $(GITHUB_REF_NAME) \
--title '$(GITHUB_REF_NAME)' \
--notes-file $(AWS_FOLDER)/$(SUFFIX_ARN_FILE)
../dev-utils/github-release.sh "$(GITHUB_REF_NAME)" "$(AWS_FOLDER)/$(SUFFIX_ARN_FILE)"

validate-version:
ifndef AGENT_VERSION
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: npm publish
run: |-
echo "//registry.npmjs.org/:_authToken=${{ env.NPMJS_TOKEN }}" > .npmrc
npm publish --otp=${{ env.TOTP_CODE }}
npm publish --tag="latest-3" --otp=${{ env.TOTP_CODE }}
- if: always()
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
workflow_dispatch:
push:
branches:
- main
- 3.x
paths-ignore:
- '**/*.md'
- '**/*.asciidoc'
- 'docs/**'
- 'examples/**'
pull_request:
branches:
- main
- 3.x
paths-ignore:
- '**/*.md'
- '**/*.asciidoc'
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ Notes:
[[release-notes-3.x]]
=== Node.js Agent version 3.x
[float]
===== Breaking changes
NOTE: "3.x" releases are now maintenance releases.
See https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html[the 4.x release notes]
for the latest (4.x) releases. The 3.x branch will be maintained until
2024-03-07 (6 months after the 4.0.0 release).
[[release-notes-3.50.0]]
==== 3.50.0 - 2023/09/07
[float]
===== Features
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ A release involves the following published artifacts:
If this is a new major release, then:

- [Create an issue](https://github.com/elastic/website-requests/issues/new) to request an update of the [EOL table](https://www.elastic.co/support/eol).
- Update the "Active release branches" section of the main README.
- Update the "Active release branches" section of the main "README.md".
- Update the "release.yml" for the new "N.x" *maintenance* branch as follows:
- The `npm publish ...` call must include a `--tag=latest-<major>` option.
- The `gh release create ...` call must include a `--latest=false` option.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ 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](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html)
Start guide](https://www.elastic.co/guide/en/apm/guide/3.x/apm-quick-start.html)
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](https://www.elastic.co/guide/en/apm/agent/nodejs/current/set-up.html)
[one of the "Get started" guides](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/set-up.html)
for the web framework or technology that you are using:

- [Get started with Express](https://www.elastic.co/guide/en/apm/agent/nodejs/current/express.html)
- [Get started with Fastify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/fastify.html)
- [Get started with Koa](https://www.elastic.co/guide/en/apm/agent/nodejs/current/koa.html)
- [Get started with hapi](https://www.elastic.co/guide/en/apm/agent/nodejs/current/hapi.html)
- [Get started with Restify](https://www.elastic.co/guide/en/apm/agent/nodejs/current/restify.html)
- [Get started with AWS Lambda](https://www.elastic.co/guide/en/apm/agent/nodejs/current/lambda.html)
- [Get started with Azure Functions](https://www.elastic.co/guide/en/apm/agent/nodejs/current/azure-functions.html)
- [Get started with TypeScript](https://www.elastic.co/guide/en/apm/agent/nodejs/current/typescript.html)
- [Get started with Express](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/express.html)
- [Get started with Fastify](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/fastify.html)
- [Get started with Koa](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/koa.html)
- [Get started with hapi](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/hapi.html)
- [Get started with Restify](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/restify.html)
- [Get started with AWS Lambda](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/lambda.html)
- [Get started with Azure Functions](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/azure-functions.html)
- [Get started with TypeScript](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/typescript.html)

Typically, the quick start steps are:

Expand All @@ -63,42 +63,43 @@ Typically, the quick start steps are:
require('elastic-apm-node').start({
serverUrl: '<serverUrl from your Elastic Stack deployment>',
secretToken: '<secretToken from your Elastic Stack deployment>'
serviceName: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#service-name
environment: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#environment
serviceName: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/configuration.html#service-name
environment: '...', // https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/configuration.html#environment
});
```

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](https://www.elastic.co/guide/en/apm/agent/nodejs/current/starting-the-agent.html)
[Starting the agent](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/starting-the-agent.html)
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](https://www.elastic.co/guide/en/apm/agent/nodejs/current/esm.html)
If your application is using ES modules, please see [ECMAScript module support](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/esm.html)
for the current *experimental* support.


## Documentation

The full [Node.js APM agent documentation is here](https://www.elastic.co/guide/en/apm/agent/nodejs/current/intro.html).
The full [Node.js APM agent 3.x documentation is here](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/intro.html).
Some important links:

- [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.
- [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).
- [Configuration options](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html) is a full configuration reference.
- [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.
- [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.
- [Metrics](https://www.elastic.co/guide/en/apm/agent/nodejs/current/metrics.html) describes the metrics that the APM agent automatically collects.
- 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.
- [Release notes](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/release-notes.html)
- [Supported Technologies](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/supported-technologies.html) describes the supported Node.js versions, which modules (and version ranges) are automatically traced, and other technologies.
- [Configuring the agent](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/configuring-the-agent.html) describes the different ways to configure the APM agent (via options to `apm.start(...)`, environment variables, or other mechanisms).
- [Configuration options](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/configuration.html) is a full configuration reference.
- [Troubleshooting](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/troubleshooting.html) describes some common issues and a way to get debugging output from the APM agent for bug reports.
- [Upgrading](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/upgrading.html) includes a guide for upgrading from each past major version of the APM agent.
- [Metrics](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/metrics.html) describes the metrics that the APM agent automatically collects.
- The APM agent includes an [OpenTelemetry Bridge](https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/opentelemetry-bridge.html) that allows one to use the vendor-agnostic OpenTelemetry API for manual instrumentation in your application, should you require manual instrumentation.


## Active release branches

The following git branches are active:

- The ["main" branch](https://github.com/elastic/apm-agent-nodejs/tree/main) is being used for **4.x releases**.
- 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.
- 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.


## Contributing
Expand Down
39 changes: 39 additions & 0 deletions dev-utils/github-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Create a GitHub release. If the given tag name is the *latest* version, and
# is not a pre-release, then the GH release will be marked as the latest.
# (This is typically only run from the release.yml CI workflow.)
#
# Usage:
# ./dev-utils/github-release.sh TAG_NAME RELEASE_NOTES_FILE
# Example:
# ./dev-utils/github-release.sh v3.49.1 ../build/aws/arn-file.md
#
# - For auth, this expects the 'GH_TOKEN' envvar to have been set.
# - The 'TAG_NAME' is typically from the 'GITHUB_REF_NAME' variable
# (https://docs.github.com/en/actions/learn-github-actions/variables)
# from a GitHub Actions workflow run.
# - The 'RELEASE_NOTES_FILE' is a path to an already built file to use as
# the release notes (using GitHub-flavored Markdown).

set -euo pipefail

readonly TAG_NAME="$1"
readonly RELEASE_NOTES_FILE="$2"

echo "INFO: List current GitHub releases"
gh release list

# The latest (by semver version ordering) git version tag, excluding pre-releases.
readonly LATEST_GIT_TAG=$(git tag --list --sort=version:refname "v*" | grep -v - | tail -n1)
if [[ "$TAG_NAME" == "$LATEST_GIT_TAG" ]]; then
IS_LATEST=true
else
IS_LATEST=false
fi

echo "INFO: Create '$TAG_NAME' GitHub release (latest=$IS_LATEST)."
gh release create "$TAG_NAME" \
--title "$TAG_NAME" \
--notes-file "$RELEASE_NOTES_FILE" \
--latest=$IS_LATEST
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elastic-apm-node",
"version": "3.49.1",
"version": "3.50.0",
"description": "The official Elastic APM agent for Node.js",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 9167a43

Please sign in to comment.