Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm authored Nov 26, 2024
2 parents 9cd5cf9 + 6ee7e7f commit 1725502
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 34 deletions.
8 changes: 2 additions & 6 deletions examples/redis/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`);

Expand Down
6 changes: 3 additions & 3 deletions examples/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion examples/web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
38 changes: 17 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase<AwsLambdaInstr
}

const handler = path.basename(handlerDef);
const moduleRoot = handlerDef.substr(0, handlerDef.length - handler.length);
const moduleRoot = handlerDef.substring(
0,
handlerDef.length - handler.length
);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class SnsServiceExtension implements ServiceExtension {
if (topicArn || targetArn) {
const arn = topicArn ?? targetArn;
try {
return arn.substr(arn.lastIndexOf(':') + 1);
return arn.substring(arn.lastIndexOf(':') + 1);
} catch (err) {
return arn;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@opentelemetry/api": "^1.3.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",
Expand Down

0 comments on commit 1725502

Please sign in to comment.