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

@instana/core

Package Overview
Dependencies
Maintainers
2
Versions
258
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 2.22.0 to 2.22.1

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [2.22.1](https://github.com/instana/nodejs/compare/v2.22.0...v2.22.1) (2023-05-15)
### Bug Fixes
* **db2:** ensure span is correctly processed as an IBM DB2 span ([de3a8b4](https://github.com/instana/nodejs/commit/de3a8b4e2241fe089cb1938b6eb955057ec2b33e))
* **sqs:** fix missing async context in recent aws-sdk/client-sqs version ([6ae90e7](https://github.com/instana/nodejs/commit/6ae90e74fee5c47cc4ade67d21c4885d34c08847))
# [2.22.0](https://github.com/instana/nodejs/compare/v2.21.1...v2.22.0) (2023-05-09)

@@ -8,0 +20,0 @@

4

package.json
{
"name": "@instana/core",
"version": "2.22.0",
"version": "2.22.1",
"description": "Core library for Instana's Node.js packages",

@@ -137,3 +137,3 @@ "main": "src/index.js",

},
"gitHead": "c04cea9b1b34bed622a3a8a63d4b009b3be4aab4"
"gitHead": "f05987e351ccc5fb60cbf00768b6daf8732a93d2"
}

@@ -24,5 +24,11 @@ /*

/**
* Depending on what kind of data the metric or snapshot attributes represents, a number of different payloads are
* valid. Ultimately, it depends on what the backend understands.
* @typedef {string|Object.<string, any>|Array.<string>} SnapshotOrMetricsPayload
*/
/**
* @typedef {Object} InstanaMetricsModule
* @property {string} payloadPrefix
* @property {string} [currentPayload]
* @property {SnapshotOrMetricsPayload} currentPayload
* @property {(config?: InstanaConfig) => void} [activate]

@@ -79,6 +85,6 @@ * @property {() => void} [deactivate]

/**
* @returns {Object.<string, string>}
* @returns {Object.<string, SnapshotOrMetricsPayload>}
*/
exports.gatherData = function gatherData() {
/** @type {Object.<string, string>} */
/** @type {Object.<string, SnapshotOrMetricsPayload>} */
const payload = {};

@@ -85,0 +91,0 @@

@@ -312,2 +312,3 @@ /*

const originalPromiseFn = awsRequest.promise;
awsRequest.promise = cls.ns.bind(function () {

@@ -314,0 +315,0 @@ const promise = originalPromiseFn.apply(awsRequest, arguments);

@@ -35,2 +35,5 @@ /*

// NOTE: each aws product can have it's own init fn to wrap or unwrap specific functions
awsProducts.forEach(awsProduct => awsProduct.init && awsProduct.init(requireHook, shimmer));
/**

@@ -37,0 +40,0 @@ * @aws-sdk/smithly-client >= 3.36.0 changed how the dist structure gets delivered

@@ -42,2 +42,27 @@ /*

class InstanaAWSSQS extends InstanaAWSProduct {
init(requireHook, shimmer) {
requireHook.onFileLoad(/@aws-sdk\/client-sqs\/dist-cjs\/SQS\.js/, function (module) {
shimmer.wrap(module.SQS.prototype, 'receiveMessage', function (originalReceiveMsgFn) {
return function instanaReceiveMessage() {
return cls.ns.runAndReturn(() => {
const ctx = cls.getAsyncContext();
this._instanaCtx = ctx;
const promise = originalReceiveMsgFn.apply(this, arguments);
promise.then = cls.ns.bind(promise.then);
if (promise.catch) {
promise.catch = cls.ns.bind(promise.catch);
}
if (promise.finally) {
promise.finally = cls.ns.bind(promise.finally);
}
return promise;
});
};
});
});
}
instrumentedSmithySend(ctx, originalSend, smithySendArgs) {

@@ -170,2 +195,4 @@ const commandName = smithySendArgs[0].constructor.name;

// Note: we pass in ctx._instanaCtx as the second parameter to runAndReturn which will run the function in the
// context belonging to this SQS promise.
return cls.ns.runAndReturn(() => {

@@ -242,2 +269,3 @@ const self = this;

const messages = data.Messages;
let tracingAttributes = readTracingAttributes(messages[0].MessageAttributes);

@@ -289,3 +317,3 @@ if (!hasTracingAttributes(tracingAttributes)) {

}
});
}, ctx._instanaCtx);
}

@@ -292,0 +320,0 @@

@@ -18,3 +18,3 @@ /*

exports.spanName = 'db2';
exports.spanName = 'ibmdb2';

@@ -21,0 +21,0 @@ exports.init = function init() {

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