You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using autoInstrument does not work at all with the very popular http request library got.
When running the referenced repo with ROLLBAR_ACCESS_TOKEN=<token> node test.js it produces the following error:
TypeError: callback.apply is not a function
at ClientRequest.<anonymous> (/Users/richard/git/rollbar-got-issue/node_modules/rollbar/src/server/telemetry.js:119:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:535:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
I believe the issue is in urlHelpers since it's assigning cb = options without checking that options actually is a function. Removing the assignment of cb = options does solve the issue, however I don't know what implications that might have for other things so I don't want to submit a PR with that as the solution.
Repro repo: https://github.com/richardsimko/rollbar-got-issue
Using
autoInstrument
does not work at all with the very popular http request librarygot
.When running the referenced repo with
ROLLBAR_ACCESS_TOKEN=<token> node test.js
it produces the following error:I believe the issue is in
urlHelpers
since it's assigningcb = options
without checking thatoptions actually is a function
. Removing the assignment ofcb = options
does solve the issue, however I don't know what implications that might have for other things so I don't want to submit a PR with that as the solution.rollbar.js/src/server/telemetry/urlHelpers.js
Line 20 in e964ecb
The text was updated successfully, but these errors were encountered: