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: Support binary based decoding for SNS message attributes #269

Merged
merged 4 commits into from
Mar 3, 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
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node12","resource:integration-tests-js-XXXX-process-input-traced_node12","cold_start:true","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs12.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev12.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.apigateway","resource":" ","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"type":"http"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node12","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getAPIGatewayRequestId","resource":"getAPIGatewayRequestId","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"}]]}
END Duration: XXXX ms (init: XXXX ms) Memory Used: XXXX MB
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node12","resource:integration-tests-js-XXXX-process-input-traced_node12","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs12.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev12.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node12","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sns","resource":"sns-lambda","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12","type":"sns"}]]}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sns","resource":"sns-lambda","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12","type":"sns"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node12","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"}]]}
END Duration: XXXX ms Memory Used: XXXX MB
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node12","resource:integration-tests-js-XXXX-process-input-traced_node12","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs12.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev12.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node12","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sqs","resource":"my-queue","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"my-queue","type":"web"}]]}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sqs","resource":"my-queue","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"my-queue","type":"web"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node12","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node12"}]]}
END Duration: XXXX ms Memory Used: XXXX MB
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node14","resource:integration-tests-js-XXXX-process-input-traced_node14","cold_start:true","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs14.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev14.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.apigateway","resource":" ","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"type":"http"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node14","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getAPIGatewayRequestId","resource":"getAPIGatewayRequestId","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"}]]}
END Duration: XXXX ms (init: XXXX ms) Memory Used: XXXX MB
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node14","resource:integration-tests-js-XXXX-process-input-traced_node14","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs14.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev14.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node14","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sns","resource":"sns-lambda","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14","type":"sns"}]]}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sns","resource":"sns-lambda","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14","type":"sns"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node14","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"}]]}
END Duration: XXXX ms Memory Used: XXXX MB
START
{"e":XXXX,"m":"aws.lambda.enhanced.invocations","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-process-input-traced_node14","resource:integration-tests-js-XXXX-process-input-traced_node14","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs14.x"],"v":1}
{"e":XXXX,"m":"serverless.integration_test.execution","t":["function:process-input-traced","dd_lambda_layer:datadog-nodev14.XX.X"],"v":1}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node14","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sqs","resource":"my-queue","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"my-queue","type":"web"}]]}
{"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.sqs","resource":"my-queue","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"my-queue","type":"web"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-tests-js-XXXX-process-input-traced_node14","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"getRecordIds","resource":"getRecordIds","error":0,"meta":{"XXXX": "XXXX"},"metrics":{"XXXX": "XXXX"},"start":XXXX,"duration":XXXX,"service":"integration-tests-js-XXXX-process-input-traced_node14"}]]}
END Duration: XXXX ms Memory Used: XXXX MB
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-throw-error-traced_node12","resource:integration-tests-js-XXXX-throw-error-traced_node12","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs12.x"],"v":1}
{"e":XXXX,"m":"aws.lambda.enhanced.errors","t":["region:sa-east-1","account_id:XXXX","functionname:integration-tests-js-XXXX-throw-error-traced_node12","resource:integration-tests-js-XXXX-throw-error-traced_node12","cold_start:false","memorysize:1024","datadog_lambda:vX.X.X","runtime:nodejs12.x"],"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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/node": "^15.6.1",
"@types/promise-retry": "^1.1.3",
"@types/shimmer": "^1.0.1",
"dd-trace": "^2.1.1",
"dd-trace": "^2.3.1",
"jest": "^27.0.1",
"mock-fs": "4.14.0",
"nock": "13.0.11",
Expand Down
Loading