@instana/core
Advanced tools
Comparing version 2.19.0 to 2.20.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.20.0](https://github.com/instana/nodejs/compare/v2.19.0...v2.20.0) (2023-03-24) | ||
### Features | ||
* **collector:** added support for amqplib 0.10.x ([b56a827](https://github.com/instana/nodejs/commit/b56a82791a1b62eed57232df9c2df699b0a4f863)) | ||
# [2.19.0](https://github.com/instana/nodejs/compare/v2.18.1...v2.19.0) (2023-03-17) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@instana/core", | ||
"version": "2.19.0", | ||
"version": "2.20.0", | ||
"description": "Core library for Instana's Node.js packages", | ||
@@ -137,3 +137,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "3fec1d458321e80740e3de94829629b93b5df400" | ||
"gitHead": "c71af966fc982536e9c68f9fca477b8b91fad090" | ||
} |
@@ -28,3 +28,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../shimmer'); | ||
const wrap = shimmer.wrap; | ||
@@ -31,0 +31,0 @@ const unwrap = shimmer.unwrap; |
@@ -278,1 +278,3 @@ /* | ||
}; | ||
exports.shimmer = require('./shimmer'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../../shimmer'); | ||
const requireHook = require('../../../../../util/requireHook'); | ||
@@ -11,0 +11,0 @@ |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../../shimmer'); | ||
const cls = require('../../../../cls'); | ||
@@ -11,0 +11,0 @@ const { |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../../shimmer'); | ||
const requireHook = require('../../../../../util/requireHook'); | ||
@@ -11,0 +11,0 @@ const { getFunctionArguments } = require('../../../../../util/function_arguments'); |
@@ -7,3 +7,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../../shimmer'); | ||
const requireHook = require('../../../../../util/requireHook'); | ||
@@ -10,0 +10,0 @@ const cls = require('../../../../cls'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../shimmer'); | ||
@@ -11,0 +11,0 @@ const cls = require('../../../cls'); |
@@ -9,3 +9,3 @@ /* | ||
const path = require('path'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../../shimmer'); | ||
@@ -12,0 +12,0 @@ const cls = require('../../../cls'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -7,3 +7,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -10,0 +10,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -9,3 +9,3 @@ /* | ||
const url = require('url'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -12,0 +12,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -12,3 +12,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const requireHook = require('../../../util/requireHook'); | ||
@@ -15,0 +15,0 @@ const { getFunctionArguments } = require('../../../util/function_arguments'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -58,3 +58,3 @@ const requireHook = require('../../../util/requireHook'); | ||
if (connection.Connection.prototype[fnName]) { | ||
shimmer.wrap(connection.Connection.prototype, fnName, shimCmapMethod); | ||
shimmer.wrap(connection.Connection.prototype, fnName, shimCmapMethod.bind(null, fnName)); | ||
} | ||
@@ -103,3 +103,3 @@ }); | ||
function shimCmapMethod(original) { | ||
function shimCmapMethod(fnName, original) { | ||
return function () { | ||
@@ -115,3 +115,3 @@ if (cls.skipExitTracing({ isActive })) { | ||
return instrumentedCmapMethod(this, original, originalArgs, original.name); | ||
return instrumentedCmapMethod(this, original, originalArgs, fnName); | ||
}; | ||
@@ -118,0 +118,0 @@ } |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ let logger; |
@@ -8,4 +8,2 @@ /* | ||
const shimmer = require('shimmer'); | ||
const requireHook = require('../../../util/requireHook'); | ||
@@ -15,2 +13,3 @@ const tracingUtil = require('../../tracingUtil'); | ||
const cls = require('../../cls'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -17,0 +16,0 @@ let isActive = false; |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -9,3 +9,3 @@ /* | ||
const LRU = require('lru-cache'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -12,0 +12,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -11,3 +11,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -14,0 +14,0 @@ let logger; |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const methods = require('methods'); | ||
@@ -11,0 +11,0 @@ |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -10,3 +10,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -13,0 +13,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -10,3 +10,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const tracingUtil = require('../../tracingUtil'); | ||
@@ -13,0 +13,0 @@ const constants = require('../../constants'); |
@@ -9,3 +9,3 @@ /* | ||
const util = require('util'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -12,0 +12,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -11,3 +11,3 @@ /* | ||
const { inspect } = require('util'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -14,0 +14,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -155,3 +155,12 @@ const requireHook = require('../../../util/requireHook'); | ||
const consumerTag = fields.consumerTag; | ||
const consumer = ctx.consumers[consumerTag]; | ||
let consumer; | ||
// 0.10.x | ||
// https://github.com/amqp-node/amqplib/commit/d483493e6825ed7d770e68f4cec60979d0feeae7 | ||
if (ctx.consumers.get && typeof ctx.consumers.get === 'function') { | ||
consumer = ctx.consumers.get(consumerTag); | ||
} else { | ||
consumer = ctx.consumers[consumerTag]; | ||
} | ||
if (!consumer) { | ||
@@ -241,2 +250,3 @@ // amqplib will throw an error for this call because it can't be routed, so we don't create a span for it. | ||
const span = cls.startSpan('rabbitmq', constants.ENTRY); | ||
return originalGet.apply(ctx, originalArgs).then(result => { | ||
@@ -243,0 +253,0 @@ if (!result) { |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const cls = require('../../cls'); | ||
@@ -11,0 +11,0 @@ const { ENTRY, EXIT } = require('../../constants'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ const requireHook = require('../../../util/requireHook'); |
@@ -13,3 +13,3 @@ /* | ||
const cls = require('../../cls'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const { getFunctionArguments } = require('../../../util/function_arguments'); | ||
@@ -16,0 +16,0 @@ let traceCorrelationEnabled = constants.kafkaTraceCorrelationDefault; |
@@ -11,3 +11,3 @@ /* | ||
const { ENTRY } = require('../../constants'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const cls = require('../../cls'); | ||
@@ -14,0 +14,0 @@ const spanBuffer = require('../../spanBuffer'); |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ let logger; |
@@ -9,3 +9,3 @@ /* | ||
const util = require('util'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -12,0 +12,0 @@ let logger; |
@@ -7,3 +7,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -10,0 +10,0 @@ let logger; |
@@ -9,3 +9,3 @@ /* | ||
const http2 = require('http2'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -12,0 +12,0 @@ const cls = require('../../cls'); |
@@ -18,3 +18,3 @@ /* | ||
} = require('./captureHttpHeadersUtil'); | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
const cls = require('../../cls'); | ||
@@ -21,0 +21,0 @@ |
@@ -8,3 +8,3 @@ /* | ||
const shimmer = require('shimmer'); | ||
const shimmer = require('../../shimmer'); | ||
@@ -11,0 +11,0 @@ /** @type {import('../../../logger').GenericLogger} */ |
704944
120
18674