Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Clean build and copy handler.js #307

Merged
merged 3 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 228 additions & 0 deletions integration_tests/snapshots/logs/esm_node12.log

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"resource_names": "GET /{proxy+}",
Expand All @@ -47,6 +48,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -168,6 +170,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
Expand All @@ -185,6 +188,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -284,6 +288,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
Expand All @@ -298,6 +303,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"resource_names": "GET /{proxy+}",
Expand All @@ -47,6 +48,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -168,6 +170,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
Expand All @@ -185,6 +188,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -284,6 +288,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
Expand All @@ -298,6 +303,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
Expand All @@ -48,6 +49,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -172,6 +174,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"version": "1.0.0",
"runtime-id":"XXXX",
Expand All @@ -190,6 +193,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -291,6 +295,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"version": "1.0.0",
"runtime-id":"XXXX",
Expand All @@ -306,6 +311,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"resource_names": "GET /{proxy+}",
Expand All @@ -53,6 +54,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -121,6 +123,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
Expand All @@ -138,6 +141,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -205,6 +209,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
Expand All @@ -219,6 +224,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
"resource_names": "GET /{proxy+}",
Expand All @@ -53,6 +54,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -121,6 +123,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"runtime-id":"XXXX",
"operation_name": "aws.sns",
Expand All @@ -138,6 +141,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -205,6 +209,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"runtime-id":"XXXX",
"operation_name": "aws.sqs",
Expand All @@ -219,6 +224,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ START
"resource": "GET /{proxy+}",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"version": "1.0.0",
"runtime-id":"XXXX",
"operation_name": "aws.apigateway",
Expand All @@ -54,6 +55,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -123,6 +125,7 @@ START
"resource": "sns-lambda",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sns",
"version": "1.0.0",
"runtime-id":"XXXX",
Expand All @@ -141,6 +144,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"_sampling_priority_v1": 1
},
"start":XXXX,
Expand Down Expand Up @@ -209,6 +213,7 @@ START
"resource": "my-queue",
"error": 0,
"meta": {
"_dd.p.dm": "-0",
"service": "sqs",
"version": "1.0.0",
"runtime-id":"XXXX",
Expand All @@ -224,6 +229,7 @@ START
},
"metrics": {
"_dd.agent_psr": 1,
"_dd.top_level": 1,
"retry_count": 1,
"_sampling_priority_v1": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ START
XXXX-XX-XX XX:XX:XX.XXX ERROR [dd.trace_id=XXXX dd.span_id=XXXX] Invoke Error {"errorType":"Error","errorMessage":"Hello","stack":["Error: Hello"," at handle (/var/task/throw-error-traced.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/utils/handler.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at step (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at Object.next (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at new Promise (<anonymous>)"," at __awaiter (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"]}
END Duration: XXXX ms Memory Used: XXXX MB
START
XXXX-XX-XX XX:XX:XX.XXX ERROR [dd.trace_id=XXXX dd.span_id=XXXX] Invoke Error {"errorType":"Error","errorMessage":"Hello","stack":["Error: Hello"," at handle (/var/task/throw-error-traced.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/utils/handler.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at step (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at Object.next (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at new Promise (<anonymous>)"," at __awaiter (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"]}
{
"e": XXXX,
"m": "aws.lambda.enhanced.invocations",
Expand Down Expand Up @@ -95,5 +96,4 @@ START
],
"v": 1
}
XXXX-XX-XX XX:XX:XX.XXX ERROR [dd.trace_id=XXXX dd.span_id=XXXX] Invoke Error {"errorType":"Error","errorMessage":"Hello","stack":["Error: Hello"," at handle (/var/task/throw-error-traced.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/utils/handler.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at step (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at Object.next (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at new Promise (<anonymous>)"," at __awaiter (/opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX)"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"," at /opt/nodejs/node_modules/datadog-lambda-js/index.js:XXX:XXX"]}
END Duration: XXXX ms Memory Used: XXXX MB
4 changes: 4 additions & 0 deletions scripts/publish_prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ if [ "$CONT" != "y" ]; then
fi

echo 'Publishing to NPM'
if [ -d "./dist" ]; then
rm -rf ./dist
fi
yarn build
cp ./dist/handler.cjs ./dist/handler.js
yarn publish --new-version "$NEW_VERSION"

echo
Expand Down
Loading