-
Notifications
You must be signed in to change notification settings - Fork 384
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
Research replacing recordConsume instrumentation wrapping with record #981
Comments
Also closes newrelic#981, since it removes the biggest use of `shim.wrap` with `this.record`.
Also closes newrelic#981, since it removes the biggest use of `shim.wrap` with `this.record`.
Also closes newrelic#981, since it removes the biggest use of `shim.wrap` with `this.record`. The resulting function is much simpler!
Also closes newrelic#981, since it removes the biggest use of `shim.wrap` with `this.record`. The resulting function is much simpler!
Some notes. When stepping through the test: node-newrelic/test/unit/shim/message-shim.test.js Lines 451 to 465 in 957529e
With the following line using node-newrelic/lib/shim/message-shim/index.js Line 294 in 8af22b8
We get the following (rough) traces: this.wrap
this.record
At the moment, all I am able to discern from this is that |
This is because record requires you to pass in the name as part of the spec. |
I have ideas here but it's just easier for me to do it instead of reporting back |
We found a bug in
recordConsume
#977 and we made a quick fix. This ticket will serve as a research/prototype to investigate whether or not we can just usethis.record
withinrecordConsume
instead ofthis.wrap
. It looks like for this method we made up amessageHandler
spec key which executes after a callback finishes or promise resolves and we copy parameters to the segment. I'm wondering if we can just usespec.after
to achieve this? But also since this API is exposed would it be a breaking change?The text was updated successfully, but these errors were encountered: