We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See the conversation in #2421. Basically, the following needs to be refactored in order to satisfy the SonarQube linter:
node-newrelic/lib/instrumentation/pino/pino.js
Lines 18 to 95 in 599072b
Prior to opening the PR for review, I attempted:
function instrument(shim, tools) { // snip shim.wrap(tools, 'asJson', function wrapJson(shim, asJson) { return wrappedAsJson.bind({ shim, agent, symbols, asJson, metrics, config}) } } function wrappedAsJson() { const { shim, agent, symbols, asJson, metrics, config } = this // implementation }
But that won't work because wrappedAsJson needs this to be bound to the instrumented instance of Pino.
wrappedAsJson
this
The text was updated successfully, but these errors were encountered:
https://new-relic.atlassian.net/browse/NR-298951
Sorry, something went wrong.
bizob2828
Successfully merging a pull request may close this issue.
See the conversation in #2421. Basically, the following needs to be refactored in order to satisfy the SonarQube linter:
node-newrelic/lib/instrumentation/pino/pino.js
Lines 18 to 95 in 599072b
Prior to opening the PR for review, I attempted:
But that won't work because
wrappedAsJson
needsthis
to be bound to the instrumented instance of Pino.The text was updated successfully, but these errors were encountered: