Skip to content

Commit 5b434e6

Browse files
authored
Merge branch 'main' into main
2 parents 2e03b46 + d3c7739 commit 5b434e6

File tree

39 files changed

+4729
-2266
lines changed

39 files changed

+4729
-2266
lines changed

.github/component_owners.yml

Lines changed: 4 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:

.github/workflows/lint.yml

Lines changed: 2 additions & 2 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
1717
- 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
pull-requests: write
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Run add-labels-to-reviewed-pr.sh
2323
run: |

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
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
@@ -171,6 +172,7 @@ jobs:
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:

.github/workflows/test.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
node-version: 18
2828
- name: Install
2929
run: npm ci --ignore-scripts
30+
timeout-minutes: 10
3031
# Note: when pushing to main we want to test only what changed in
3132
# last commit. Otherwise we want to test all changes from origin/main.
3233
# So we set the right values for base and head commits depending
@@ -71,18 +72,18 @@ jobs:
7172
memcached:
7273
image: memcached:1.6.39-alpine
7374
ports:
74-
- 11211:11211
75+
- 11211:11211
7576
mongo:
7677
image: mongo
7778
ports:
78-
- 27017:27017
79+
- 27017:27017
7980
mssql:
8081
image: mcr.microsoft.com/mssql/server:2022-latest
8182
env:
8283
MSSQL_SA_PASSWORD: mssql_passw0rd
8384
ACCEPT_EULA: Y
8485
ports:
85-
- 1433:1433
86+
- 1433:1433
8687
options: >-
8788
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -C -Q 'select 1' -b -o /dev/null"
8889
--health-interval 1s
@@ -97,7 +98,7 @@ jobs:
9798
MYSQL_DATABASE: otel_mysql_database
9899
MYSQL_ROOT_PASSWORD: rootpw
99100
ports:
100-
- 3306:3306
101+
- 3306:3306
101102
options: >-
102103
--health-cmd="mysqladmin ping"
103104
--health-interval 10s
@@ -123,7 +124,7 @@ jobs:
123124
POSTGRES_DB: otel_pg_database
124125
POSTGRES_PASSWORD: postgres
125126
ports:
126-
- 5432:5432
127+
- 5432:5432
127128
options: >-
128129
--health-cmd pg_isready
129130
--health-interval 10s
@@ -132,7 +133,7 @@ jobs:
132133
redis:
133134
image: redis
134135
ports:
135-
- 6379:6379
136+
- 6379:6379
136137
options: >-
137138
--health-cmd "redis-cli ping"
138139
--health-interval 10s
@@ -141,11 +142,11 @@ jobs:
141142
cassandra:
142143
image: cassandra:3
143144
ports:
144-
- 9042:9042
145+
- 9042:9042
145146
rabbitmq:
146147
image: rabbitmq:3
147148
ports:
148-
- 22221:5672
149+
- 22221:5672
149150
env:
150151
RABBITMQ_DEFAULT_USER: username
151152
RABBITMQ_DEFAULT_PASS: password
@@ -198,6 +199,7 @@ jobs:
198199
node-version: ${{ matrix.node }}
199200
- name: Install
200201
run: npm ci
202+
timeout-minutes: 10
201203
- name: Download Build Artifacts
202204
uses: actions/download-artifact@v5
203205
with:
@@ -242,6 +244,7 @@ jobs:
242244
with:
243245
node-version: ${{ matrix.node }}
244246
- run: npm ci
247+
timeout-minutes: 10
245248
- name: Download Build Artifacts
246249
uses: actions/download-artifact@v5
247250
with:
@@ -286,6 +289,7 @@ jobs:
286289
node-version: 18
287290
- name: Install
288291
run: npm ci --ignore-scripts
292+
timeout-minutes: 10
289293
# Note: Keep this in sync with the node versions from `test-all-versions` job.
290294
- name: Download Test Artifacts (18)
291295
uses: actions/download-artifact@v5
@@ -312,4 +316,3 @@ jobs:
312316
env:
313317
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
314318
PR_BRANCH_NAME: ${{ github.event.pull_request.head.label }}
315-

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"packages/instrumentation-lru-memoizer": "0.52.0",
2828
"packages/instrumentation-mongoose": "0.54.0",
2929
"packages/instrumentation-runtime-node": "0.21.0",
30+
"packages/instrumentation-sequelize": "0.1.0",
3031
"packages/instrumentation-socket.io": "0.54.0",
3132
"packages/instrumentation-tedious": "0.26.0",
3233
"packages/instrumentation-typeorm": "0.8.0",

examples/express/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/express#readme",
3030
"dependencies": {
3131
"@opentelemetry/api": "^1.9.0",
32-
"@opentelemetry/exporter-trace-otlp-proto": "^0.54.2",
33-
"@opentelemetry/instrumentation": "^0.54.2",
34-
"@opentelemetry/instrumentation-express": "^0.44.0",
35-
"@opentelemetry/instrumentation-http": "^0.54.2",
36-
"@opentelemetry/resources": "^1.27.0",
37-
"@opentelemetry/sdk-trace-base": "^1.27.0",
38-
"@opentelemetry/sdk-trace-node": "^1.27.0",
39-
"@opentelemetry/semantic-conventions": "^1.27.0",
40-
"axios": "^1.6.0",
41-
"express": "^4.17.1"
32+
"@opentelemetry/exporter-trace-otlp-proto": "^0.207.0",
33+
"@opentelemetry/instrumentation": "^0.207.0",
34+
"@opentelemetry/instrumentation-express": "^0.56.0",
35+
"@opentelemetry/instrumentation-http": "^0.207.0",
36+
"@opentelemetry/resources": "^2.2.0",
37+
"@opentelemetry/sdk-trace-base": "^2.2.0",
38+
"@opentelemetry/sdk-trace-node": "^2.2.0",
39+
"@opentelemetry/semantic-conventions": "^1.37.0",
40+
"axios": "^1.13.1",
41+
"express": "^5.1.0"
4242
},
4343
"devDependencies": {
44-
"@types/express": "^4.17.13",
44+
"@types/express": "^5.0.5",
4545
"@types/node": "18.18.14",
46-
"ts-node": "^10.6.0",
46+
"ts-node": "^10.9.2",
4747
"typescript": "5.0.4"
4848
}
4949
}

examples/express/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ async function makeRequest() {
5454
);
5555
}
5656

57-
makeRequest().catch(err => console.log(err));
57+
makeRequest().catch(err => console.error(err));

examples/express/src/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ setupTracing('example-express-server');
2323
import * as express from 'express';
2424
import * as axios from 'axios';
2525
import { RequestHandler } from 'express';
26+
import type { Resource } from '@opentelemetry/resources';
2627

2728
// Setup express
2829
const app = express();
2930
const PORT = 8080;
3031

3132
const getCrudController = () => {
3233
const router = express.Router();
33-
const resources: any[] = [];
34+
const resources: Resource[] = [];
3435
router.get('/', (req, res) => res.send(resources));
3536
router.post('/', (req, res) => {
3637
resources.push(req.body);

examples/express/src/tracer.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,28 @@
1414
* limitations under the License.
1515
*/
1616

17-
import {
18-
trace,
19-
SamplingDecision,
20-
SpanKind,
21-
Attributes,
22-
} from '@opentelemetry/api';
17+
import { trace, SpanKind, Attributes } from '@opentelemetry/api';
2318
import { registerInstrumentations } from '@opentelemetry/instrumentation';
2419
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
2520
import {
2621
Sampler,
2722
AlwaysOnSampler,
2823
SimpleSpanProcessor,
24+
SamplingDecision,
2925
} from '@opentelemetry/sdk-trace-base';
3026
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';
31-
import { Resource } from '@opentelemetry/resources';
3227
import {
3328
ATTR_SERVICE_NAME,
3429
ATTR_HTTP_ROUTE,
3530
} from '@opentelemetry/semantic-conventions';
3631
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
3732
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
33+
import { resourceFromAttributes } from '@opentelemetry/resources';
3834

3935
export const setupTracing = (serviceName: string) => {
4036
const exporter = new OTLPTraceExporter({});
4137
const provider = new NodeTracerProvider({
42-
resource: new Resource({
38+
resource: resourceFromAttributes({
4339
[ATTR_SERVICE_NAME]: serviceName,
4440
}),
4541
spanProcessors: [new SimpleSpanProcessor(exporter)],

0 commit comments

Comments
 (0)