Expected Behavior
No error and function works as expected without traces and logs being collected
Actual Behavior
The execution breaks with an stacktrace
Steps to Reproduce the Problem
- Configure a lambda function with the datadog tracing
- Set DD_API_KEY_SECRET_ARN to an invalid secret
- invoke function
Specifications
- Datadog Lambda Layer version: 82?
DD_EXTENSION | DEBUG | Starting Datadog Extension 82
- Node version: 18
Stacktrace
{
"stack": "Runtime.UnhandledPromiseRejection: TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'TLSSocket'\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'socket' closes the circle\n at process.<anonymous> (file:///var/runtime/index.mjs:1329:17)\n at process.emit (node:events:529:35)\n at process.emit (node:domain:489:12)\n at emit (node:internal/process/promises:149:20)\n at processPromiseRejections (node:internal/process/promises:283:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:96:32)",
"message": "TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'TLSSocket'\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'socket' closes the circle",
"reason": {
"stack": "TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'TLSSocket'\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'socket' closes the circle\n at JSON.stringify (<anonymous>)\n at emitLog (/var/task/node_modules/datadog-lambda-js/dist/utils/log.js:73:20)\n at logError (/var/task/node_modules/datadog-lambda-js/dist/utils/log.js:48:5)\n at MetricsListener.<anonymous> (/var/task/node_modules/datadog-lambda-js/dist/metrics/listener.js:310:46)\n at step (/var/task/node_modules/datadog-lambda-js/dist/metrics/listener.js:56:23)\n at Object.throw (/var/task/node_modules/datadog-lambda-js/dist/metrics/listener.js:37:53)\n at rejected (/var/task/node_modules/datadog-lambda-js/dist/metrics/listener.js:29:65)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
"message": "Converting circular structure to JSON\n --> starting at object with constructor 'TLSSocket'\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'socket' closes the circle"
},
"promise": {}
}
Expected Behavior
No error and function works as expected without traces and logs being collected
Actual Behavior
The execution breaks with an stacktrace
Steps to Reproduce the Problem
Specifications
DD_EXTENSION | DEBUG | Starting Datadog Extension 82Stacktrace