datadog-lambda-js
Advanced tools
Comparing version 5.71.0 to 5.72.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.datadogLambdaVersion = void 0; | ||
exports.datadogLambdaVersion = "5.71.0"; | ||
exports.datadogLambdaVersion = "5.72.0"; | ||
//# sourceMappingURL=constants.js.map |
@@ -207,3 +207,3 @@ "use strict"; | ||
if (err instanceof Error) { | ||
(0, utils_1.logError)("Error parsing SQS message trace data", err); | ||
(0, utils_1.logDebug)("Error parsing SQS message trace data", err); | ||
} | ||
@@ -224,3 +224,10 @@ return; | ||
parsedBody.MessageAttributes._datadog.Value) { | ||
var traceData = JSON.parse(parsedBody.MessageAttributes._datadog.Value); | ||
var traceData = void 0; | ||
if (parsedBody.MessageAttributes._datadog.Type === "String") { | ||
traceData = JSON.parse(parsedBody.MessageAttributes._datadog.Value); | ||
} | ||
else { | ||
var b64Decoded = Buffer.from(parsedBody.MessageAttributes._datadog.Value, "base64").toString("ascii"); | ||
traceData = JSON.parse(b64Decoded); | ||
} | ||
var traceID = traceData[constants_1.traceIDHeader]; | ||
@@ -245,3 +252,3 @@ var parentID = traceData[constants_1.parentIDHeader]; | ||
if (err instanceof Error) { | ||
(0, utils_1.logError)("Error parsing SNS SQS message trace data", err); | ||
(0, utils_1.logDebug)("Error parsing SNS SQS message trace data", err); | ||
} | ||
@@ -279,3 +286,3 @@ return; | ||
if (err instanceof Error) { | ||
(0, utils_1.logError)("Error parsing Kinesis message trace data", err); | ||
(0, utils_1.logDebug)("Error parsing Kinesis message trace data", err); | ||
} | ||
@@ -310,3 +317,3 @@ return; | ||
if (err instanceof Error) { | ||
(0, utils_1.logError)("Error parsing Eventbridge trace data", err); | ||
(0, utils_1.logDebug)("Error parsing Eventbridge trace data", err); | ||
} | ||
@@ -322,3 +329,10 @@ return; | ||
try { | ||
var traceData = JSON.parse(event.Records[0].Sns.MessageAttributes._datadog.Value); | ||
var traceData = void 0; | ||
if (event.Records[0].Sns.MessageAttributes._datadog.Type === "String") { | ||
traceData = JSON.parse(event.Records[0].Sns.MessageAttributes._datadog.Value); | ||
} | ||
else { | ||
var b64Decoded = Buffer.from(event.Records[0].Sns.MessageAttributes._datadog.Value, "base64").toString("ascii"); | ||
traceData = JSON.parse(b64Decoded); | ||
} | ||
var traceID = traceData[constants_1.traceIDHeader]; | ||
@@ -342,3 +356,3 @@ var parentID = traceData[constants_1.parentIDHeader]; | ||
if (err instanceof Error) { | ||
(0, utils_1.logError)("Error parsing SNS SQS message trace data", err); | ||
(0, utils_1.logDebug)("Error parsing SNS SQS message trace data", err); | ||
} | ||
@@ -345,0 +359,0 @@ return; |
{ | ||
"name": "datadog-lambda-js", | ||
"version": "5.71.0", | ||
"version": "5.72.0", | ||
"description": "Lambda client library that supports hybrid tracing in node js", | ||
@@ -28,3 +28,3 @@ "main": "dist/index.js", | ||
"@types/shimmer": "^1.0.1", | ||
"dd-trace": "^2.1.1", | ||
"dd-trace": "^2.3.1", | ||
"jest": "^27.0.1", | ||
@@ -31,0 +31,0 @@ "mock-fs": "4.14.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
373515
5239