@instana/core
Advanced tools
Comparing version 1.106.6 to 1.107.0
{ | ||
"name": "@instana/core", | ||
"version": "1.106.6", | ||
"version": "1.107.0", | ||
"description": "Core library for Instana's Node.js packages", | ||
@@ -136,3 +136,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "a13253b1e65d4c66d32495e092d8990073a0240f" | ||
"gitHead": "813a22cdd52f0fd1caa2112697892ddabf41ee05" | ||
} |
'use strict'; | ||
exports.traceIdHeaderName = 'X-INSTANA-T'; | ||
exports.traceIdHeaderNameLowerCase = exports.traceIdHeaderName.toLowerCase(); | ||
exports.spanIdHeaderName = 'X-INSTANA-S'; | ||
exports.spanIdHeaderNameLowerCase = exports.spanIdHeaderName.toLowerCase(); | ||
exports.traceIdHeaderName = 'X-INSTANA-T'; | ||
exports.traceIdHeaderNameLowerCase = exports.traceIdHeaderName.toLowerCase(); | ||
exports.traceLevelHeaderName = 'X-INSTANA-L'; | ||
@@ -10,0 +10,0 @@ exports.traceLevelHeaderNameLowerCase = exports.traceLevelHeaderName.toLowerCase(); |
@@ -23,2 +23,3 @@ 'use strict'; | ||
'./instrumentation/cloud/aws/sdk', | ||
'./instrumentation/cloud/gcp/pubsub', | ||
'./instrumentation/cloud/gcp/storage', | ||
@@ -25,0 +26,0 @@ './instrumentation/control_flow/bluebird', |
@@ -52,4 +52,2 @@ 'use strict'; | ||
function instrumentedSendMessage(ctx, originalSendMessage, originalArgs) { | ||
const parentSpan = cls.getCurrentSpan(); | ||
if (cls.tracingSuppressed()) { | ||
@@ -60,2 +58,3 @@ propagateSuppression(originalArgs[0]); | ||
const parentSpan = cls.getCurrentSpan(); | ||
if ( | ||
@@ -113,20 +112,20 @@ !parentSpan || // | ||
// fields or properties. | ||
setHeaders(originalArgs[0], span); | ||
setHeaders(originalArgs[1], span); | ||
propagateTraceContext(originalArgs[0], span); | ||
propagateTraceContext(originalArgs[1], span); | ||
} | ||
function setHeaders(map, span) { | ||
function propagateSuppression(map) { | ||
if (!map || !map.headers) { | ||
return; | ||
} | ||
map.headers[constants.traceIdHeaderName] = span.t; | ||
map.headers[constants.spanIdHeaderName] = span.s; | ||
map.headers[constants.traceLevelHeaderName] = '1'; | ||
map.headers[constants.traceLevelHeaderName] = '0'; | ||
} | ||
function propagateSuppression(map) { | ||
function propagateTraceContext(map, span) { | ||
if (!map || !map.headers) { | ||
return; | ||
} | ||
map.headers[constants.traceLevelHeaderName] = '0'; | ||
map.headers[constants.traceIdHeaderName] = span.t; | ||
map.headers[constants.spanIdHeaderName] = span.s; | ||
map.headers[constants.traceLevelHeaderName] = '1'; | ||
} | ||
@@ -133,0 +132,0 @@ |
@@ -6,2 +6,5 @@ 'use strict'; | ||
/\/@elastic\/elasticsearch\/index.js/, | ||
/\/@google-cloud\/pubsub\/build\/src\/publisher\/index.js/, | ||
/\/@google-cloud\/pubsub\/build\/src\/subscriber.js/, | ||
/\/@google-cloud\/storage\/build\/src\/index.js/, | ||
/\/@hapi\/call\/lib\//, | ||
@@ -36,2 +39,3 @@ /\/amqplib\/lib\//, | ||
/\/request\/index.js/, | ||
/\/superagent\/lib\/node\/index.js/, | ||
/\/winston\/lib\/winston.js/ | ||
@@ -38,0 +42,0 @@ ]; |
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
392224
87
10659