Skip to content

Commit

Permalink
chore: minify tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Aug 31, 2024
1 parent e771780 commit 5755270
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"workspaces": {
"packages": [
"packages/lambda-layer/nodejs",
"packages/*"
]
},
Expand Down
19 changes: 7 additions & 12 deletions packages/api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ provider:

layers:
tracer:
path: ../lambda-layer
path: ../lambda-layer/artifact
name: ${self:service}-layer
description: Auto-tracing layer for your functions
compatibleRuntimes:
Expand All @@ -99,17 +99,12 @@ layers:
- nodejs20.x

functions:
hello-world: # TODO: remove me
handler: src/functions/hello-world/handler.handler
# layers:
# - !Ref TracerLambdaLayer
# environment:
# AUTO_TRACE_HOST: qislq0r597.execute-api.eu-west-1.amazonaws.com
# AWS_LAMBDA_EXEC_WRAPPER: /opt/nodejs/tracer_wrapper
events:
- httpApi:
path: /hello
method: get
# hello-world:
# handler: src/functions/hello-world/handler.handler
# events:
# - httpApi:
# path: /hello
# method: get
main:
handler: src/index.handler
events:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const tracer = require("@lumigo/tracer")({
token: "t_0000000000000000",
edgeHost: process.env.AUTO_TRACE_HOST,
});

const { load } = require("./aws/aws-user-function.js");
const initLogger = require("./logger.js");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const index = require("./dist/auto_tracer_wrapper.js");
const index = require("./artifact/nodejs/dist/auto_tracer_wrapper.js");

describe("tracer", () => {
beforeEach(() => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"main": "index.js",
"scripts": {
"test": "yarn build && jest",
"build": "esbuild index.js --bundle --platform=node --minify --target=node16 --outfile=dist/auto_tracer_wrapper.js"
"build": "esbuild index.js --bundle --platform=node --minify --target=node16 --outfile=artifact/nodejs/dist/auto_tracer_wrapper.js"
},
"files": [
"dist/index.js"
"nodejs/dist/index.js"
],
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4834,9 +4834,9 @@ __metadata:
languageName: unknown
linkType: soft

"@trace-stack/lambda-layer@workspace:packages/lambda-layer/nodejs":
"@trace-stack/lambda-layer@workspace:packages/lambda-layer":
version: 0.0.0-use.local
resolution: "@trace-stack/lambda-layer@workspace:packages/lambda-layer/nodejs"
resolution: "@trace-stack/lambda-layer@workspace:packages/lambda-layer"
dependencies:
"@lumigo/tracer": "npm:^1.99.3"
"@types/jest": "npm:^29.5.12"
Expand Down

0 comments on commit 5755270

Please sign in to comment.