Skip to content

Commit aaabf23

Browse files
authored
Merge branch 'main' into bump-semantic-conventions
2 parents 3acaed5 + 6ee7e7f commit aaabf23

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

examples/redis/src/server.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const tracer = setupTracing('example-redis-server');
77
import * as express from 'express';
88
import axios from 'axios';
99
import * as tracerHandlers from './express-tracer-handlers';
10+
import { randomBytes } from 'crypto';
1011
const redisPromise = require('./setup-redis').redis;
1112

1213
// Setup express
@@ -20,12 +21,7 @@ async function setupRoutes() {
2021
const redis = await redisPromise;
2122

2223
app.get('/run_test', async (req: express.Request, res: express.Response) => {
23-
const uuid = Math.random()
24-
.toString(36)
25-
.substring(2, 15)
26-
+ Math.random()
27-
.toString(36)
28-
.substring(2, 15);
24+
const uuid = randomBytes(16).toString('hex');
2925
await axios.get(`http://localhost:${PORT}/set?args=uuid,${uuid}`);
3026
const body = await axios.get(`http://localhost:${PORT}/get?args=uuid`);
3127

examples/web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"docker:start": "cd ./docker && docker-compose down && docker-compose up",
99
"docker:startd": "cd ./docker && docker-compose down && docker-compose up -d",
10-
"start": "webpack-dev-server -d --progress --colors --port 8090 --config webpack.config.js --hot --inline --host 0.0.0.0 --content-base examples"
10+
"start": "webpack-dev-server --progress --color --port 8090 --config ./webpack.config.js --hot --host 0.0.0.0"
1111
},
1212
"repository": {
1313
"type": "git",
@@ -31,8 +31,8 @@
3131
"babel-loader": "^8.3.0",
3232
"ts-loader": "^6.2.2",
3333
"webpack": "5.89.0",
34-
"webpack-cli": "^3.3.12",
35-
"webpack-dev-server": "^3.11.3",
34+
"webpack-cli": "^5.0.0",
35+
"webpack-dev-server": "^4.0.0",
3636
"webpack-merge": "^4.2.2"
3737
},
3838
"dependencies": {

examples/web/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const common = {
4949
module.exports = webpackMerge(common, {
5050
devtool: 'eval-source-map',
5151
devServer: {
52-
contentBase: path.resolve(__dirname),
52+
static: path.resolve(path.join(__dirname, "examples")),
5353
},
5454
plugins: [
5555
new webpack.DefinePlugin({

plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase<AwsLambdaInstr
9090
}
9191

9292
const handler = path.basename(handlerDef);
93-
const moduleRoot = handlerDef.substr(0, handlerDef.length - handler.length);
93+
const moduleRoot = handlerDef.substring(
94+
0,
95+
handlerDef.length - handler.length
96+
);
9497

9598
const [module, functionName] = handler.split('.', 2);
9699

plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class SnsServiceExtension implements ServiceExtension {
9393
if (topicArn || targetArn) {
9494
const arn = topicArn ?? targetArn;
9595
try {
96-
return arn.substr(arn.lastIndexOf(':') + 1);
96+
return arn.substring(arn.lastIndexOf(':') + 1);
9797
} catch (err) {
9898
return arn;
9999
}

0 commit comments

Comments
 (0)