Skip to content

Commit 1e4b81d

Browse files
authored
Merge branch 'main' into fix/web-example-deps
2 parents 9a9fa52 + 2784357 commit 1e4b81d

File tree

5 files changed

+25
-30
lines changed

5 files changed

+25
-30
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

package-lock.json

Lines changed: 17 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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
}

plugins/node/opentelemetry-instrumentation-koa/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@opentelemetry/api": "^1.3.0"
4646
},
4747
"devDependencies": {
48-
"@koa/router": "12.0.1",
48+
"@koa/router": "13.1.0",
4949
"@opentelemetry/api": "^1.3.0",
5050
"@opentelemetry/context-async-hooks": "^1.8.0",
5151
"@opentelemetry/contrib-test-utils": "^0.43.0",

0 commit comments

Comments
 (0)