diff --git a/examples/redis/src/server.ts b/examples/redis/src/server.ts index 3227fed8bf..b3a5c1c936 100644 --- a/examples/redis/src/server.ts +++ b/examples/redis/src/server.ts @@ -7,6 +7,7 @@ const tracer = setupTracing('example-redis-server'); import * as express from 'express'; import axios from 'axios'; import * as tracerHandlers from './express-tracer-handlers'; +import { randomBytes } from 'crypto'; const redisPromise = require('./setup-redis').redis; // Setup express @@ -20,12 +21,7 @@ async function setupRoutes() { const redis = await redisPromise; app.get('/run_test', async (req: express.Request, res: express.Response) => { - const uuid = Math.random() - .toString(36) - .substring(2, 15) - + Math.random() - .toString(36) - .substring(2, 15); + const uuid = randomBytes(16).toString('hex'); await axios.get(`http://localhost:${PORT}/set?args=uuid,${uuid}`); const body = await axios.get(`http://localhost:${PORT}/get?args=uuid`); diff --git a/examples/web/package.json b/examples/web/package.json index af7ca620c9..107c379fe9 100644 --- a/examples/web/package.json +++ b/examples/web/package.json @@ -7,7 +7,7 @@ "scripts": { "docker:start": "cd ./docker && docker-compose down && docker-compose up", "docker:startd": "cd ./docker && docker-compose down && docker-compose up -d", - "start": "webpack-dev-server -d --progress --colors --port 8090 --config webpack.config.js --hot --inline --host 0.0.0.0 --content-base examples" + "start": "webpack-dev-server --progress --color --port 8090 --config ./webpack.config.js --hot --host 0.0.0.0" }, "repository": { "type": "git", @@ -31,8 +31,8 @@ "babel-loader": "^8.3.0", "ts-loader": "^6.2.2", "webpack": "5.89.0", - "webpack-cli": "^3.3.12", - "webpack-dev-server": "^3.11.3", + "webpack-cli": "^5.0.0", + "webpack-dev-server": "^4.0.0", "webpack-merge": "^4.2.2" }, "dependencies": { diff --git a/examples/web/webpack.config.js b/examples/web/webpack.config.js index fd3de03bb4..31905640e1 100644 --- a/examples/web/webpack.config.js +++ b/examples/web/webpack.config.js @@ -49,7 +49,7 @@ const common = { module.exports = webpackMerge(common, { devtool: 'eval-source-map', devServer: { - contentBase: path.resolve(__dirname), + static: path.resolve(path.join(__dirname, "examples")), }, plugins: [ new webpack.DefinePlugin({ diff --git a/package-lock.json b/package-lock.json index b69520b6b1..03be175022 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7812,25 +7812,23 @@ } }, "node_modules/@koa/router": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-12.0.1.tgz", - "integrity": "sha512-ribfPYfHb+Uw3b27Eiw6NPqjhIhTpVFzEWLwyc/1Xp+DCdwRRyIlAUODX+9bPARF6aQtUu1+/PHzdNvRzcs/+Q==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@koa/router/-/router-13.1.0.tgz", + "integrity": "sha512-mNVu1nvkpSd8Q8gMebGbCkDWJ51ODetrFvLKYusej+V0ByD4btqHYnPIzTBLXnQMVUlm/oxVwqmWBY3zQfZilw==", "dev": true, "dependencies": { - "debug": "^4.3.4", "http-errors": "^2.0.0", "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.2.1" + "path-to-regexp": "^6.3.0" }, "engines": { - "node": ">= 12" + "node": ">= 18" } }, "node_modules/@koa/router/node_modules/path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", "dev": true }, "node_modules/@lerna/child-process": { @@ -37496,7 +37494,7 @@ "@opentelemetry/semantic-conventions": "^1.27.0" }, "devDependencies": { - "@koa/router": "12.0.1", + "@koa/router": "13.1.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/contrib-test-utils": "^0.43.0", @@ -45183,22 +45181,20 @@ } }, "@koa/router": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-12.0.1.tgz", - "integrity": "sha512-ribfPYfHb+Uw3b27Eiw6NPqjhIhTpVFzEWLwyc/1Xp+DCdwRRyIlAUODX+9bPARF6aQtUu1+/PHzdNvRzcs/+Q==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@koa/router/-/router-13.1.0.tgz", + "integrity": "sha512-mNVu1nvkpSd8Q8gMebGbCkDWJ51ODetrFvLKYusej+V0ByD4btqHYnPIzTBLXnQMVUlm/oxVwqmWBY3zQfZilw==", "dev": true, "requires": { - "debug": "^4.3.4", "http-errors": "^2.0.0", "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.2.1" + "path-to-regexp": "^6.3.0" }, "dependencies": { "path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", "dev": true } } @@ -48078,7 +48074,7 @@ "@opentelemetry/instrumentation-koa": { "version": "file:plugins/node/opentelemetry-instrumentation-koa", "requires": { - "@koa/router": "12.0.1", + "@koa/router": "13.1.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/contrib-test-utils": "^0.43.0", diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts index 23755bb264..c6d63ca86a 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts @@ -90,7 +90,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase