Skip to content

Commit a9130f7

Browse files
committed
Merge branch 'main' of github.com:elastic/apm-agent-nodejs into feature/support-specific-modules
* 'main' of github.com:elastic/apm-agent-nodejs: (54 commits) chore: fix dev-utils/ci-tav-slow-jobs.sh (elastic#3319) test: reduce TAV test matrix for slowest jobs (elastic#3321) chore: sync package-lock so 'npm ci' can work (elastic#3318) docs: document `useElasticTraceparentHeader` config var (elastic#3316) chore, test: test driver improvements (elastic#3293) test: drop node 14 from RC tests now that it is EOL (elastic#3315) test: fix running fastify.test.js with node v8 (elastic#3317) feat: add @apollo/server@4 support (elastic#3203) chore: update nvm (elastic#3309) tests: stop testing 'express-graphql' instrumentation (elastic#3304) chore: fix bitrot.js dev util for recent changes (elastic#3308) test: restore testing of Azure Functions on node >=18.x (elastic#3307) fix: support Lambda instrumentation for `contextManager: 'patch'`; refactor Lambda tests (elastic#3305) test: fix fastify TAV test failures (elastic#3314) test: fix @aws-sdk/client-s3 TAV test failures (elastic#3312) feat: add instrumentation for aws-sdk S3 client (elastic#3287) feat(fastify): add captureBody support (elastic#2681) feat: mysql2@3 support (elastic#3301) chore(deps): bump @opentelemetry/exporter-prometheus from 0.37.0 to 0.38.0 in /test/opentelemetry-metrics/fixtures (elastic#3295) chore(deps-dev): bump fastify from 4.16.3 to 4.17.0 (elastic#3296) ...
2 parents c58a8b4 + 605d700 commit a9130f7

File tree

120 files changed

+19410
-14008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+19410
-14008
lines changed

.ci/docker/node-edge-container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ENV NVM_NODEJS_ORG_MIRROR=${NVM_NODEJS_ORG_MIRROR}
2121
ENV ELASTIC_APM_CONTEXT_MANAGER=${ELASTIC_APM_CONTEXT_MANAGER}
2222

2323
# nvm environment variables
24-
ENV NVM_VERSION v0.34.0
24+
ENV NVM_VERSION v0.39.3
2525
ENV NVM_DIR /usr/local/nvm
2626
RUN mkdir $NVM_DIR
2727
RUN curl --silent -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash

.ci/scripts/prepare-benchmarks-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [[ -z "$NODE_VERSION" ]]; then
1515
fi
1616

1717
# This particular configuration is required to be installed in the baremetal
18-
curl -sS -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
18+
curl -sS -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
1919
export NVM_DIR="$HOME/.nvm"
2020
set +x # Disable xtrace because output using nvm.sh is huge.
2121
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

.ci/scripts/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ set -o xtrace
140140

141141
# ---- For nightly and rc builds, determine if there is a point in testing.
142142

143-
if [[ $BUILD_TYPE != "release" && $FORCE != "true" ]]; then
143+
if [[ $BUILD_TYPE != "release" ]]; then
144144
# If there is no nightly/rc build for this version, then skip.
145145
#
146146
# Note: We are relying on new releases being added to the top of index.tab,
@@ -165,7 +165,7 @@ if [[ $BUILD_TYPE != "release" && $FORCE != "true" ]]; then
165165
possible_release_version=${edge_node_version%-*} # remove "-*" suffix
166166
release_version=$(curl -sS https://nodejs.org/dist/index.tab \
167167
| (grep -E "^${possible_release_version}\>" || true) | awk '{print $1}')
168-
if [[ -n "$release_version" ]]; then
168+
if [[ -n "$release_version" && $FORCE != "true" ]]; then
169169
skip "There is already a release build (${release_version}) of the latest v${NODE_VERSION} ${BUILD_TYPE} (${edge_node_version}). Skipping tests."
170170
fi
171171

@@ -213,7 +213,7 @@ elif [[ -n "${TAV_MODULE}" ]]; then
213213
memcached)
214214
DOCKER_COMPOSE_FILE=docker-compose-memcached.yml
215215
;;
216-
aws-sdk)
216+
aws-sdk|@aws-sdk/client-s3)
217217
DOCKER_COMPOSE_FILE=docker-compose-localstack.yml
218218
;;
219219
*)

.ci/tav.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
{
2-
"versions": [ "19", "18", "16", "14", "12", "10", "8" ],
2+
"// todo": "We want versions=['20','19','18','16','14','12','10','8'], but versions*modules needs to be <256 for the GH Actions jobs limit",
3+
"versions": [ "20", "18", "16", "14", "12", "10", "8" ],
34
"modules": [
5+
"@apollo/server",
6+
"@aws-sdk/client-s3",
47
"@elastic/elasticsearch",
58
"@elastic/elasticsearch-canary",
69
"@hapi/hapi",
7-
"@koa/router",
810
"@opentelemetry/api",
11+
"@opentelemetry/sdk-metrics",
912
"apollo-server-express",
1013
"aws-sdk",
11-
"bluebird",
1214
"cassandra-driver",
1315
"elasticsearch",
1416
"express",
15-
"express-graphql",
1617
"express-queue",
1718
"fastify",
1819
"finalhandler",
1920
"generic-pool",
20-
"got",
2121
"graphql",
22-
"handlebars",
2322
"ioredis",
2423
"knex",
25-
"koa-router",
2624
"memcached",
27-
"mimic-response",
2825
"mongodb",
2926
"mongodb-core",
3027
"mysql",
3128
"mysql2",
3229
"next",
3330
"pg",
34-
"pug",
3531
"redis",
3632
"restify",
3733
"tedious",
3834
"undici",
39-
"ws"
35+
"ws",
36+
"@koa/router,koa-router",
37+
"handlebars,pug",
38+
"bluebird,got"
4039
]
4140
}

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"/.nyc_output",
1616
"/build",
1717
"node_modules",
18+
"elastic-apm-node.js",
1819
"/examples/esbuild/dist",
1920
"/examples/typescript/dist",
2021
"/examples/nextjs",
@@ -30,6 +31,6 @@
3031
"/test/types/transpile/index.js",
3132
"/test/types/transpile-default/index.js",
3233
"/test_output",
33-
"/tmp"
34+
"tmp"
3435
]
3536
}

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ updates:
88
reviewers:
99
- "elastic/apm-agent-node-js"
1010

11+
- package-ecosystem: "npm"
12+
directory: "/test/instrumentation/azure-functions/fixtures/AJsAzureFnApp"
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 5
16+
reviewers:
17+
- "elastic/apm-agent-node-js"
18+
1119
- package-ecosystem: "npm"
1220
directory: "/test/instrumentation/modules/next/a-nextjs-app"
1321
schedule:
@@ -16,6 +24,22 @@ updates:
1624
reviewers:
1725
- "elastic/apm-agent-node-js"
1826

27+
- package-ecosystem: "npm"
28+
directory: "/test/opentelemetry-bridge"
29+
schedule:
30+
interval: "weekly"
31+
open-pull-requests-limit: 5
32+
reviewers:
33+
- "elastic/apm-agent-node-js"
34+
35+
- package-ecosystem: "npm"
36+
directory: "/test/opentelemetry-metrics/fixtures"
37+
schedule:
38+
interval: "weekly"
39+
open-pull-requests-limit: 5
40+
reviewers:
41+
- "elastic/apm-agent-node-js"
42+
1943
- package-ecosystem: "npm"
2044
directory: "/examples/opentelemetry-bridge"
2145
schedule:

.github/workflows/edge.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
node: [ "20" ]
40+
node: [ "21" ]
4141
contextManager: [ 'patch', '' ]
4242
steps:
4343
- uses: actions/checkout@v3
4444
- run: .ci/scripts/test.sh -b "nightly" "${{ matrix.node }}"
4545
env:
4646
ELASTIC_APM_CONTEXT_MANAGER: ${{ matrix.contextManager }}
4747

48-
# This should list all active Node.js major versions listed at:
49-
# https://nodejs.org/en/about/releases/
48+
# This should list all the Node.js major versions listed at
49+
# https://nodejs.org/en/about/releases/, plus the next version (for which
50+
# nightlies are currently being built).
5051
#
5152
# The node.js project *sometimes* produces "rc" builds leading up to a new
5253
# release. They get uploaded to: https://nodejs.org/download/rc/
@@ -57,10 +58,11 @@ jobs:
5758
fail-fast: false
5859
matrix:
5960
node:
61+
- "21"
62+
- "20"
6063
- "19"
6164
- "18"
6265
- "16"
63-
- "14"
6466
contextManager: [ 'patch', '' ]
6567
steps:
6668
- uses: actions/checkout@v3

.github/workflows/tav.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
max-parallel: 15
5555
fail-fast: false
5656
matrix:
57+
# A job matrix limit is 256. We do some grouping of TAV modules to
58+
# stay under that limit.
59+
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
5760
node: ${{ fromJSON(needs.prepare-matrix.outputs.versions) }}
5861
module: ${{ fromJSON(needs.prepare-matrix.outputs.modules) }}
5962
steps:

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Test
22

33
# https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/2
44
on:
5+
workflow_dispatch:
56
push:
67
branches:
78
- main
@@ -115,6 +116,7 @@ jobs:
115116
fail-fast: false
116117
matrix:
117118
node:
119+
- '20'
118120
- '19'
119121
- '18'
120122
- '18.0'

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
/build
1313
node_modules
1414
/test/benchmarks/.tmp
15-
/tmp
15+
tmp
1616
/examples/*/dist
1717
.next

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workaround unresolvable peerDependencies between express-graphql, graphql,
1+
# Workaround unresolvable peerDependencies between graphql, @apollo-server,
22
# and apollo-server-express. npm v7 (included with node v15) makes these
33
# peerDependencies issues an install error. Until the community catches up
44
# and resolves peerDependencies issues or apm-agent-nodejs.git's tests are

0 commit comments

Comments
 (0)