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

@instana/core

Package Overview
Dependencies
Maintainers
0
Versions
256
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 3.12.0 to 3.13.0

6

CHANGELOG.md

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

# [3.13.0](https://github.com/instana/nodejs/compare/v3.12.0...v3.13.0) (2024-06-24)
### Features
- **couchbase:** added support for raw sql queries ([#1187](https://github.com/instana/nodejs/issues/1187)) ([660795e](https://github.com/instana/nodejs/commit/660795e5d5fcf49656460031dc44507521512dfa))
# [3.12.0](https://github.com/instana/nodejs/compare/v3.11.0...v3.12.0) (2024-06-21)

@@ -8,0 +14,0 @@

4

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

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

},
"gitHead": "5ea9b5084da3c6121aaad7e0fa8eb9594d60ca79"
"gitHead": "c841560ab99ae8a2fc36cb456e77fa3bfd16b74f"
}

@@ -89,3 +89,3 @@ /*

// #### SEARCH QUERY
shimmer.wrap(cluster, 'searchQuery', instrumentOperation.bind(null, { connectionStr, sqlType: 'SEARCHQUERY' }));
shimmer.wrap(cluster, 'searchQuery', instrumentOperation.bind(null, { connectionStr, sql: 'SEARCHQUERY' }));

@@ -105,19 +105,40 @@ // #### CRUD

// cluster.query
shimmer.wrap(cluster, 'query', instrumentOperation.bind(null, { connectionStr, sqlType: 'QUERY' }));
shimmer.wrap(cluster, 'query', function insatanClusterQuery(original) {
return function instanaClusterQueryWrapped() {
const originalThis = this;
const originalArgs = arguments;
const sqlStatement = originalArgs[0] || '';
return instrumentOperation(
{
connectionStr,
sql: tracingUtil.shortenDatabaseStatement(sqlStatement)
},
original
).apply(originalThis, originalArgs);
};
});
// #### ANALYTICS SERVICE
shimmer.wrap(
cluster,
'analyticsQuery',
instrumentOperation.bind(null, {
connectionStr,
sqlType: 'ANALYTICSQUERY',
resultHandler: (span, result) => {
if (result && result.rows && result.rows.length > 0 && result.rows[0].BucketName) {
span.data.couchbase.bucket = result.rows[0].BucketName;
span.data.couchbase.type = bucketLookup[span.data.couchbase.bucket];
}
}
})
);
shimmer.wrap(cluster, 'analyticsQuery', function instanaClusterAnalyticsQuery(original) {
return function instanaClusterAnalyticsQueryWrapped() {
const originalThis = this;
const originalArgs = arguments;
const sqlStatement = originalArgs[0] || '';
return instrumentOperation(
{
connectionStr,
sql: tracingUtil.shortenDatabaseStatement(sqlStatement),
resultHandler: (span, result) => {
if (result && result.rows && result.rows.length > 0 && result.rows[0].BucketName) {
span.data.couchbase.bucket = result.rows[0].BucketName;
span.data.couchbase.type = bucketLookup[span.data.couchbase.bucket];
}
}
},
original
).apply(originalThis, originalArgs);
};
});
}

@@ -150,12 +171,15 @@

op => {
shimmer.wrap(
collection,
op,
instrumentOperation.bind(null, {
connectionStr,
bucketName,
getBucketTypeFn,
sqlType: op.toUpperCase()
})
);
shimmer.wrap(collection, op, function instanaCollectionWrapped(original) {
return function instanaCollectionWrappedInner() {
return instrumentOperation(
{
connectionStr,
bucketName,
getBucketTypeFn,
sql: op.toUpperCase()
},
original
).apply(this, arguments);
};
});
}

@@ -167,13 +191,20 @@ );

shimmer.wrap(
scope,
'query',
instrumentOperation.bind(null, {
connectionStr,
sqlType: 'QUERY',
bucketName,
getBucketTypeFn: getBucketType(cluster, bucketName)
})
);
shimmer.wrap(scope, 'query', function instanaScopeQuery(original) {
return function instanaScopeQueryWrapped() {
const originalThis = this;
const originalArgs = arguments;
const sqlStatement = originalArgs[0] || '';
return instrumentOperation(
{
connectionStr,
bucketName,
getBucketTypeFn: getBucketType(cluster, bucketName),
sql: tracingUtil.shortenDatabaseStatement(sqlStatement)
},
original
).apply(originalThis, originalArgs);
};
});
return scope;

@@ -214,3 +245,3 @@ };

connectionStr,
sqlType: fnName.toUpperCase(),
sql: fnName.toUpperCase(),
bucketName,

@@ -260,3 +291,3 @@ getBucketTypeFn,

connectionStr,
sqlType: fnName.toUpperCase(),
sql: fnName.toUpperCase(),
bucketName,

@@ -311,3 +342,3 @@ getBucketTypeFn

getBucketTypeFn,
sqlType: op.toUpperCase()
sql: op.toUpperCase()
},

@@ -368,3 +399,3 @@ original

function instrumentOperation({ connectionStr, bucketName, getBucketTypeFn, sqlType, resultHandler }, original) {
function instrumentOperation({ connectionStr, bucketName, getBucketTypeFn, sql, resultHandler }, original) {
return function instanaOpOverride() {

@@ -387,3 +418,3 @@ const originalThis = this;

type: bucketType,
sql: sqlType
sql
};

@@ -390,0 +421,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