Skip to content

Commit 67820a7

Browse files
committed
Merge branch 'main' into oracledb-context
2 parents e58acdc + 86eef0d commit 67820a7

File tree

226 files changed

+12246
-9941
lines changed

Some content is hidden

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

226 files changed

+12246
-9941
lines changed

.github/component-label-map.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ pkg:instrumentation-user-interaction:
245245
- changed-files:
246246
- any-glob-to-any-file:
247247
- packages/instrumentation-user-interaction/**
248+
pkg:instrumentation-web-exception:
249+
- changed-files:
250+
- any-glob-to-any-file:
251+
- packages/instrumentation-web-exception/**
248252
pkg:instrumentation-winston:
249253
- changed-files:
250254
- any-glob-to-any-file:

.github/component_owners.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ components:
7272
- blumamir
7373
packages/instrumentation-socket.io:
7474
- mottibec
75+
packages/instrumentation-sequelize:
76+
- seemk
77+
- t2t2
78+
- mhennoch
7579
packages/instrumentation-tedious: []
7680
# Unmaintained
7781
packages/instrumentation-typeorm:
@@ -156,6 +160,10 @@ components:
156160
- t2t2
157161
packages/instrumentation-user-interaction:
158162
- obecny
163+
packages/instrumentation-web-exception:
164+
- martinkuba
165+
- pkanal
166+
- wolfgangcodes
159167
packages/plugin-react-load:
160168
- martinkuba
161169
packages/propagator-instana:

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
build:
13+
lint:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v5
17-
- uses: actions/setup-node@v5
17+
- uses: actions/setup-node@v6
1818
with:
1919
node-version: 18
20-
cache: 'npm'
20+
cache: npm
2121
- run: npm ci --ignore-scripts
2222
- name: Lint
2323
run: |

.github/workflows/pr-review.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PR review
2+
# This workflow is triggered when a PR review is submitted. It checks if the review is approved and runs a script to add labels to the PR based on the review.
3+
on:
4+
pull_request_review:
5+
types:
6+
- submitted
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
add-owner-approved-label:
13+
if: github.event.review.state == 'approved'
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
22+
- name: Run add-labels-to-reviewed-pr.sh
23+
run: |
24+
chmod +x ./.github/workflows/scripts/add-labels-to-reviewed-pr.sh
25+
./.github/workflows/scripts/add-labels-to-reviewed-pr.sh
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
REPO: ${{ github.repository }}
29+
PR: ${{ github.event.pull_request.number }}

.github/workflows/release-please-validate.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ jobs:
1313
rp-validate:
1414
runs-on: ubuntu-latest
1515
container:
16-
image: node:20
16+
image: node:22
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v5
2020

21-
- name: Install glob
22-
run: npm install glob
23-
2421
- name: Ensure Release Please Config and Manifest are in sync with the repository
2522
run: node scripts/check-release-please.mjs

.github/workflows/release-please.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fetch-depth: 0
2121

2222
- name: Setup Node
23-
uses: actions/setup-node@v5
23+
uses: actions/setup-node@v6
2424
with:
2525
node-version: 18
2626
registry-url: 'https://registry.npmjs.org'
@@ -63,7 +63,7 @@ jobs:
6363
environment: npm-publish-environment
6464
steps:
6565
- uses: actions/checkout@v5
66-
- uses: actions/setup-node@v5
66+
- uses: actions/setup-node@v6
6767
with:
6868
# Require npm 11.5.1 or later for https://docs.npmjs.com/trusted-publishers.
6969
node-version: 24
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Adds a "has:owner-approval" label to a PR if a reviewer who approved it is a component owner.
18+
19+
set -euo pipefail
20+
21+
if [[ -z "${REPO:-}" || -z "${PR:-}" ]]; then
22+
echo "One or more of REPO and PR have not been set. Please ensure each is set."
23+
exit 0
24+
fi
25+
26+
main () {
27+
CUR_DIRECTORY=$(dirname "$0")
28+
29+
# The latestReviews key returns the latest review for each reviewer cutting out any other reviews.
30+
JSON=$(gh pr view "${PR}" --json "files,author,latestReviews" | tr -dc '[:print:]' | sed -E 's/\\[a-z]//g')
31+
FILES=$(echo -n "${JSON}"| jq -r '.files[].path')
32+
LATEST_REVIEWS=$(echo -n "${JSON}" | jq -c '.latestReviews')
33+
34+
# Fetch components
35+
COMPONENTS=$(bash "${CUR_DIRECTORY}/get-components.sh" | tac) # Reversed so we visit subdirectories first
36+
37+
declare -A PROCESSED_COMPONENTS
38+
39+
for COMPONENT in ${COMPONENTS}; do
40+
COMPONENT_OWNERS=$(COMPONENT="${COMPONENT}" bash "${CUR_DIRECTORY}/get-codeowners.sh")
41+
42+
for FILE in ${FILES}; do
43+
MATCH=$(echo -n "${FILE}" | grep -E "^${COMPONENT}" || true)
44+
45+
if [[ -z "${MATCH}" ]]; then
46+
continue
47+
fi
48+
49+
# If we match a file with a component, skip further processing for this file
50+
if [[ -v PROCESSED_COMPONENTS["${COMPONENT}"] ]]; then
51+
continue
52+
fi
53+
PROCESSED_COMPONENTS["${COMPONENT}"]=true
54+
55+
# Check if updated file is owned by one of the reviewers"
56+
echo "${LATEST_REVIEWS}" | jq -c '.[]' | while IFS= read -r REVIEW; do
57+
REVIEW_AUTHOR=$(echo -n "${REVIEW}"| jq -r '.author.login')
58+
REVIEW_STATE=$(echo -n "${REVIEW}"| jq -r '.state')
59+
if [[ "${REVIEW_STATE}" == "APPROVED" ]]; then
60+
# Review is approved. Checking if reviewer is a component owner
61+
for OWNER in ${COMPONENT_OWNERS}; do
62+
if [[ "${REVIEW_AUTHOR}" == "${OWNER}" ]]; then
63+
echo "Reviewer $REVIEW_AUTHOR is a component owner. Adding 'has:owner-approval' label."
64+
gh pr edit "${PR}" --repo "${REPO}" --add-label "has:owner-approval"
65+
exit 0
66+
fi
67+
done
68+
fi
69+
done
70+
done
71+
done
72+
}
73+
74+
# Ensure the script does not block a PR even if it fails
75+
main || echo "Failed to run $0"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Gets the owners for a given component from the component_owners.yml file.
18+
19+
# Define the file path
20+
YML_FILE=".github/component_owners.yml"
21+
22+
if [[ -z "${COMPONENT:-}" ]]; then
23+
echo "COMPONENT has not been set, please ensure it is set."
24+
exit 1
25+
fi
26+
27+
FOUND=0
28+
29+
# Parse the YAML file and extract owners for the given component
30+
while IFS= read -r line; do
31+
# Check if the line matches the given component
32+
if [[ "$line" =~ ^[[:space:]]*${COMPONENT}:[[:space:]]*$ ]]; then
33+
FOUND=1
34+
continue
35+
fi
36+
37+
# If the component is found, extract owners
38+
if [[ $FOUND -eq 1 ]]; then
39+
# Stop if we encounter another component or an empty line
40+
if [[ "$line" =~ ^[[:space:]]*[^#]+: || -z "$line" ]]; then
41+
break
42+
fi
43+
44+
# Extract the owner (remove leading spaces and '- ')
45+
if [[ "$line" =~ ^[[:space:]]*-[[:space:]]*[^#]+ ]]; then
46+
OWNER=$(echo "$line" | sed -E 's/^[[:space:]]*-[[:space:]]*([^#]+).*/\1/')
47+
echo "$OWNER"
48+
fi
49+
fi
50+
done < "$YML_FILE"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Gets the components from the component_owners.yml file.
18+
19+
20+
# Define the file path
21+
YML_FILE=".github/component_owners.yml"
22+
23+
# Parse the YAML file and extract components and their owners
24+
while IFS= read -r line; do
25+
# Check if the line contains a component (ends with ':')
26+
if [[ "$line" =~ ^[[:space:]]*[^#]+: ]]; then
27+
# Extract the component name (remove leading spaces and trailing ':')
28+
COMPONENT=$(echo "$line" | sed -E 's/^[[:space:]]*([^:]+):.*/\1/')
29+
echo "$COMPONENT"
30+
fi
31+
done < "$YML_FILE"

.github/workflows/test-all-versions.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131
# Use the same Node.js version used for `release-please` workflow.
32-
- uses: actions/setup-node@v5
32+
- uses: actions/setup-node@v6
3333
with:
3434
node-version: 18
3535
- name: Install
3636
run: npm ci --ignore-scripts
37+
timeout-minutes: 10
3738
- name: Build
3839
run: npm run compile
3940
- name: Upload Build Artifacts
@@ -57,14 +58,14 @@ jobs:
5758
mongo:
5859
image: mongo
5960
ports:
60-
- 27017:27017
61+
- 27017:27017
6162
mssql:
6263
image: mcr.microsoft.com/mssql/server:2022-latest
6364
env:
6465
MSSQL_SA_PASSWORD: mssql_passw0rd
6566
ACCEPT_EULA: Y
6667
ports:
67-
- 1433:1433
68+
- 1433:1433
6869
options: >-
6970
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -C -Q 'select 1' -b -o /dev/null"
7071
--health-interval 1s
@@ -79,7 +80,7 @@ jobs:
7980
MYSQL_DATABASE: otel_mysql_database
8081
MYSQL_ROOT_PASSWORD: rootpw
8182
ports:
82-
- 3306:3306
83+
- 3306:3306
8384
options: >-
8485
--health-cmd="mysqladmin ping"
8586
--health-interval 10s
@@ -105,7 +106,7 @@ jobs:
105106
POSTGRES_DB: otel_pg_database
106107
POSTGRES_PASSWORD: postgres
107108
ports:
108-
- 5432:5432
109+
- 5432:5432
109110
options: >-
110111
--health-cmd pg_isready
111112
--health-interval 10s
@@ -114,14 +115,14 @@ jobs:
114115
rabbitmq:
115116
image: rabbitmq:3
116117
ports:
117-
- 22221:5672
118+
- 22221:5672
118119
env:
119120
RABBITMQ_DEFAULT_USER: username
120121
RABBITMQ_DEFAULT_PASS: password
121122
redis:
122123
image: redis
123124
ports:
124-
- 6379:6379
125+
- 6379:6379
125126
options: >-
126127
--health-cmd "redis-cli ping"
127128
--health-interval 10s
@@ -164,13 +165,14 @@ jobs:
164165
uses: actions/checkout@v5
165166
with:
166167
fetch-depth: 0
167-
- uses: actions/setup-node@v5
168+
- uses: actions/setup-node@v6
168169
with:
169170
node-version: ${{ matrix.node }}
170171
- name: Install
171172
# Post install scripts are required for some deps for successful test
172173
# runs: sqlite3, better-sqlite3, and possibly esbuild.
173174
run: npm ci
175+
timeout-minutes: 10
174176
- name: Download Build Artifacts
175177
uses: actions/download-artifact@v5
176178
with:

0 commit comments

Comments
 (0)