Skip to content

Commit 895674a

Browse files
committed
fix instrumenter signature
1 parent fe60da9 commit 895674a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/instrumentation/superagent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
const http = require('http')
99
const METHODS = http.METHODS.map((method) => method.toLowerCase())
1010

11-
module.exports = function instrument(shim, superagent) {
11+
module.exports = function instrument(agent, superagent, moduleName, shim) {
1212
shim.wrapExport(superagent, function wrapRequest(shim, request) {
1313
if (!shim.isFunction(request)) {
1414
shim.logger.debug('Not wrapping export, expected a function.')

test/unit/instrumentation/superagent/superagent.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ tap.test('should not wrap superagent if it is not a function', (t) => {
3838
api.shim.logger.debug = sinon.stub()
3939
const instrumentation = require('../../../../lib/instrumentation/superagent')
4040
const superagentMock = { foo: 'bar' }
41-
instrumentation(api.shim, superagentMock)
41+
instrumentation(t.context.agent, superagentMock, 'superagent', api.shim)
4242
t.equal(api.shim.logger.debug.callCount, 1, 'should call debug logger')
4343
t.equal(api.shim.logger.debug.args[0][0], 'Not wrapping export, expected a function.')
4444
t.end()

0 commit comments

Comments
 (0)