Skip to content

chore(node): Bump @opentelemetry/instrumentation-express to 0.43.0 #13948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
import { conditionalTest } from '../../../../utils';
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner';

afterAll(() => {
cleanupChildProcesses();
});

// Before Node 16, parametrization is not working properly here
conditionalTest({ min: 16 })('complex-router', () => {
describe('complex-router', () => {
test('should construct correct url with multiple parameterized routers, when param is also contain in middle layer route and express used multiple middlewares with route', done => {
// parse node.js major version
const [major = 0] = process.versions.node.split('.').map(Number);
// Split test result base on major node version because regex d flag is support from node 16+

const EXPECTED_TRANSACTION =
major >= 16
? {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
}
: {
transaction: 'GET /api/api/v1/sub-router/users/123/posts/:postId',
transaction_info: {
source: 'route',
},
};
const EXPECTED_TRANSACTION = {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
};

createRunner(__dirname, 'server.ts')
.ignore('event')
Expand All @@ -35,23 +21,12 @@ conditionalTest({ min: 16 })('complex-router', () => {
});

test('should construct correct url with multiple parameterized routers, when param is also contain in middle layer route and express used multiple middlewares with route and original url has query params', done => {
// parse node.js major version
const [major = 0] = process.versions.node.split('.').map(Number);
// Split test result base on major node version because regex d flag is support from node 16+
const EXPECTED_TRANSACTION =
major >= 16
? {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
}
: {
transaction: 'GET /api/api/v1/sub-router/users/123/posts/:postId',
transaction_info: {
source: 'route',
},
};
const EXPECTED_TRANSACTION = {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
};

createRunner(__dirname, 'server.ts')
.ignore('event')
Expand All @@ -61,23 +36,12 @@ conditionalTest({ min: 16 })('complex-router', () => {
});

test('should construct correct url with multiple parameterized routers, when param is also contain in middle layer route and express used multiple middlewares with route and original url ends with trailing slash and has query params', done => {
// parse node.js major version
const [major = 0] = process.versions.node.split('.').map(Number);
// Split test result base on major node version because regex d flag is support from node 16+
const EXPECTED_TRANSACTION =
major >= 16
? {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
}
: {
transaction: 'GET /api/api/v1/sub-router/users/123/posts/:postId',
transaction_info: {
source: 'route',
},
};
const EXPECTED_TRANSACTION = {
transaction: 'GET /api/api/v1/sub-router/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
};

createRunner(__dirname, 'server.ts')
.ignore('event')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
import { conditionalTest } from '../../../../utils';
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner';

afterAll(() => {
cleanupChildProcesses();
});

// Before Node 16, parametrization is not working properly here
conditionalTest({ min: 16 })('middle-layer-parameterized', () => {
describe('middle-layer-parameterized', () => {
test('should construct correct url with multiple parameterized routers, when param is also contain in middle layer route', done => {
// parse node.js major version
const [major = 0] = process.versions.node.split('.').map(Number);
// Split test result base on major node version because regex d flag is support from node 16+
const EXPECTED_TRANSACTION =
major >= 16
? {
transaction: 'GET /api/v1/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
}
: {
transaction: 'GET /api/v1/users/123/posts/:postId',
transaction_info: {
source: 'route',
},
};
const EXPECTED_TRANSACTION = {
transaction: 'GET /api/v1/users/:userId/posts/:postId',
transaction_info: {
source: 'route',
},
};

createRunner(__dirname, 'server.ts')
.ignore('event')
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@opentelemetry/instrumentation-amqplib": "^0.42.0",
"@opentelemetry/instrumentation-connect": "0.39.0",
"@opentelemetry/instrumentation-dataloader": "0.12.0",
"@opentelemetry/instrumentation-express": "0.42.0",
"@opentelemetry/instrumentation-express": "0.43.0",
"@opentelemetry/instrumentation-fastify": "0.39.0",
"@opentelemetry/instrumentation-fs": "0.15.0",
"@opentelemetry/instrumentation-generic-pool": "0.39.0",
Expand Down
70 changes: 10 additions & 60 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7326,10 +7326,10 @@
dependencies:
"@opentelemetry/instrumentation" "^0.53.0"

"@opentelemetry/instrumentation-express@0.42.0":
version "0.42.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-express/-/instrumentation-express-0.42.0.tgz#279f195aa66baee2b98623a16666c6229c8e7564"
integrity sha512-YNcy7ZfGnLsVEqGXQPT+S0G1AE46N21ORY7i7yUQyfhGAL4RBjnZUqefMI0NwqIl6nGbr1IpF0rZGoN8Q7x12Q==
"@opentelemetry/instrumentation-express@0.43.0":
version "0.43.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-express/-/instrumentation-express-0.43.0.tgz#35ff5bcf40b816d9a9159d5f7814ed7e5d83f69b"
integrity sha512-bxTIlzn9qPXJgrhz8/Do5Q3jIlqfpoJrSUtVGqH+90eM1v2PkPHc+SdE+zSqe4q9Y1UQJosmZ4N4bm7Zj/++MA==
dependencies:
"@opentelemetry/core" "^1.8.0"
"@opentelemetry/instrumentation" "^0.53.0"
Expand Down Expand Up @@ -9826,17 +9826,7 @@
dependencies:
"@types/unist" "*"

"@types/history-4@npm:@types/[email protected]":
version "4.7.8"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934"
integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==

"@types/history-5@npm:@types/[email protected]":
version "4.7.8"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934"
integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==

"@types/history@*":
"@types/history-4@npm:@types/[email protected]", "@types/history-5@npm:@types/[email protected]", "@types/history@*":
version "4.7.8"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934"
integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==
Expand Down Expand Up @@ -10164,15 +10154,7 @@
"@types/history" "^3"
"@types/react" "*"

"@types/react-router-4@npm:@types/[email protected]":
version "5.1.14"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.14.tgz#e0442f4eb4c446541ad7435d44a97f8fe6df40da"
integrity sha512-LAJpqYUaCTMT2anZheoidiIymt8MuX286zoVFPM3DVb23aQBH0mAkFvzpd4LKqiolV8bBtZWT5Qp7hClCNDENw==
dependencies:
"@types/history" "*"
"@types/react" "*"

"@types/react-router-5@npm:@types/[email protected]":
"@types/react-router-4@npm:@types/[email protected]", "@types/react-router-5@npm:@types/[email protected]":
version "5.1.14"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.14.tgz#e0442f4eb4c446541ad7435d44a97f8fe6df40da"
integrity sha512-LAJpqYUaCTMT2anZheoidiIymt8MuX286zoVFPM3DVb23aQBH0mAkFvzpd4LKqiolV8bBtZWT5Qp7hClCNDENw==
Expand Down Expand Up @@ -28644,7 +28626,7 @@ react-is@^18.0.0:
dependencies:
"@remix-run/router" "1.0.2"

"react-router-6@npm:[email protected]":
"react-router-6@npm:[email protected]", [email protected]:
version "6.3.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.3.0.tgz#3970cc64b4cb4eae0c1ea5203a80334fdd175557"
integrity sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==
Expand All @@ -28659,13 +28641,6 @@ react-router-dom@^6.2.2:
history "^5.2.0"
react-router "6.3.0"

[email protected]:
version "6.3.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.3.0.tgz#3970cc64b4cb4eae0c1ea5203a80334fdd175557"
integrity sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==
dependencies:
history "^5.2.0"

react@^18.0.0:
version "18.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.0.0.tgz#b468736d1f4a5891f38585ba8e8fb29f91c3cb96"
Expand Down Expand Up @@ -31114,16 +31089,7 @@ string-template@~0.2.1:
resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add"
integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

[email protected], string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", [email protected], string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -31235,14 +31201,7 @@ stringify-object@^3.2.1:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

[email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", [email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -34259,16 +34218,7 @@ wrangler@^3.67.1:
optionalDependencies:
fsevents "~2.3.2"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

[email protected], wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", [email protected], wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down
Loading