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

@instana/core

Package Overview
Dependencies
Maintainers
6
Versions
264
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.15.0 to 2.16.0

src/tracing/instrumentation/cloud/aws-sdk/v3/sqs-consumer.js

11

CHANGELOG.md

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

# [2.16.0](https://github.com/instana/nodejs/compare/v2.15.0...v2.16.0) (2023-02-13)
### Features
* **collector:** added support for sqs-consumer@6.2.0 ([#691](https://github.com/instana/nodejs/issues/691)) ([f8bf9e7](https://github.com/instana/nodejs/commit/f8bf9e79d856a9c449161e76783fd36d02c3ffb0))
# [2.15.0](https://github.com/instana/nodejs/compare/v2.14.2...v2.15.0) (2023-01-27)

@@ -8,0 +19,0 @@

4

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

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

},
"gitHead": "f39391abb88c2c6e6dd29f6d83800a0c9e5e46d7"
"gitHead": "f6a669a5d231629a5f2e4eecca212784d5ce1357"
}

@@ -20,2 +20,4 @@ /*

const sqsConsumer = require('./sqs-consumer');
/** @type {Object.<string, import('./instana_aws_product').InstanaAWSProduct} */

@@ -32,2 +34,4 @@ const operationMap = {};

exports.init = function init() {
sqsConsumer.init();
/**

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

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

const _callback = smithySendArgs[1];
smithySendArgs[1] = cls.ns.bind(function (err, data) {

@@ -215,2 +214,3 @@ if (err) {

configureEntrySpan(span, data, tracingAttributes);
setImmediate(() => {

@@ -234,2 +234,3 @@ self.finishSpan(null, span);

// NOTE: This is promise chain for the "send" method from @awsk-sdk/smithy-client, not from sqs-consumer!
request

@@ -250,3 +251,5 @@ .then(data => {

}
configureEntrySpan(span, data, tracingAttributes);
setImmediate(() => {

@@ -261,2 +264,10 @@ this.finishSpan(null, span);

}
// NOTE: attach the async context to the last message to be able to
// finish the span with the correct end time and error in the sqs-consuemr `handleMessage` function.
// 1x ReceiveMessageCommand with multiple messages (batchSize>1) == 1 sqs entry with size 4
if (data && data.Messages && data.Messages) {
data.Messages[data.Messages.length - 1].instanaAsyncContext = cls.getAsyncContext();
}
return data;

@@ -263,0 +274,0 @@ })

@@ -48,7 +48,13 @@ /*

function instrumentSubscriber(subscriber) {
if (!subscriber || !subscriber.Subscriber) {
return;
}
// NOTE: using nextTicket works for both 2.x and 3.x
// 3.x: subscriber.js loads message-queues
// message-queues.js loads subscriber
// circular dependency
process.nextTick(() => {
if (!subscriber || !subscriber.Subscriber) {
return;
}
instrumentConstructor(subscriber, 'Subscriber', 'emit', shimSubscriberEmit);
instrumentConstructor(subscriber, 'Subscriber', 'emit', shimSubscriberEmit);
});
}

@@ -55,0 +61,0 @@

@@ -60,3 +60,4 @@ /*

// with our instrumentation
if (path.isAbsolute(moduleName)) {
// CASE: we ignore all file endings, which we are not interested in. Any module can load any file.
if (path.isAbsolute(moduleName) && ['.node', '.json', '.ts'].indexOf(path.extname(moduleName)) === -1) {
// EDGE CASE for ESM: mysql2/promise.js

@@ -63,0 +64,0 @@ if (moduleName.indexOf('node_modules/mysql2/promise.js') !== -1) {

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