Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't attempt to instrument Ramda.js "when" #247

Closed
wants to merge 1 commit into from
Closed

Don't attempt to instrument Ramda.js "when" #247

wants to merge 1 commit into from

Conversation

pasieronen
Copy link
Contributor

The Ramda library (http://ramdajs.com/) contains a file named "when.js", which is completely unrelated to the When.js library (and is not even about promises).

This causes a warning Failed to instrument module when... when New Relic attempts to instrument it (tested with newrelic 1.38.2, ramda 0.23.0, Node 6.9.4), with stack trace

TypeError: Cannot read property 'prototype' of undefined
    at initialize (<DIR>/node_modules/newrelic/lib/instrumentation/promise.js:87:24)
    at initialize (<DIR>/node_modules/newrelic/lib/instrumentation/when.js:45:3)
    at instrument (<DIR>/node_modules/newrelic/lib/shimmer.js:51:22)
    at _postLoad (<DIR>/node_modules/newrelic/lib/shimmer.js:89:5)
    at Function.cls_wrapMethod [as _load] (<DIR>/node_modules/newrelic/lib/shimmer.js:263:16)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (<DIR>/node_modules/ramda/index.js:232:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.cls_wrapMethod [as _load] (<DIR>/node_modules/newrelic/lib/shimmer.js:263:38)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

The pull requests just tests whether the loaded "when" looks reasonable.

@NatalieWolfe
Copy link
Contributor

Thanks for letting us know about this! I'll pull in your changes to go out with the next release.

@NatalieWolfe
Copy link
Contributor

This went out in 1.39.0, please let me know if that update works for you. Thanks!

bizob2828 added a commit to bizob2828/node-newrelic that referenced this pull request Apr 19, 2024
bizob2828 added a commit to bizob2828/node-newrelic that referenced this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants