aws-xray-sdk-core
Advanced tools
Comparing version 3.5.0 to 3.5.1
@@ -86,3 +86,4 @@ "use strict"; | ||
const parent = (segment instanceof subsegment_1.default ? segment.segment : segment); | ||
args.request.headers['X-Amzn-Trace-Id'] = (0, querystring_1.stringify)({ | ||
const data = parent.segment ? parent.segment.additionalTraceData : parent.additionalTraceData; | ||
let traceHeader = (0, querystring_1.stringify)({ | ||
Root: parent.trace_id, | ||
@@ -92,2 +93,8 @@ Parent: subsegment.id, | ||
}, ';'); | ||
if (data != null) { | ||
for (const [key, value] of Object.entries(data)) { | ||
traceHeader += ';' + key + '=' + value; | ||
} | ||
} | ||
args.request.headers['X-Amzn-Trace-Id'] = traceHeader; | ||
let res; | ||
@@ -94,0 +101,0 @@ try { |
@@ -98,2 +98,3 @@ "use strict"; | ||
* Returns the formatted segment JSON string. | ||
* @param {Segment} segment - The segment to format. | ||
*/ | ||
@@ -100,0 +101,0 @@ format: function format(segment) { |
@@ -168,3 +168,3 @@ "use strict"; | ||
if (traceData.data) { | ||
segment.userData = traceData.data; | ||
segment.additionalTraceData = traceData.data; | ||
} | ||
@@ -171,0 +171,0 @@ logger.getLogger().debug('Segment started: ' + JSON.stringify(traceData)); |
{ | ||
"name": "aws-xray-sdk-core", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"description": "AWS X-Ray SDK for Javascript", | ||
@@ -31,3 +31,3 @@ "author": "Amazon Web Services", | ||
"cls-hooked": "^4.2.2", | ||
"semver": "^7.3.8" | ||
"semver": "^7.5.3" | ||
}, | ||
@@ -59,3 +59,3 @@ "scripts": { | ||
"repository": "https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core", | ||
"gitHead": "0579d9c75e08f8747f9eb87596bea58a7d7e9e25" | ||
"gitHead": "e32dd9580def3556ddee50b0090e2c9b97bcf361" | ||
} |
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
239317
66
5497
Updatedsemver@^7.5.3