Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@instana/core

Package Overview
Dependencies
Maintainers
3
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instana/core - npm Package Compare versions

Comparing version 1.106.6 to 1.107.0

src/tracing/instrumentation/cloud/gcp/pubsub.js

4

package.json
{
"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 @@ ];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc