-
Notifications
You must be signed in to change notification settings - Fork 404
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
[shim] Fix TypeError: segment.transaction.isActive is not a function #282
Conversation
I am also getting this error:
any word on including this? If the agent is going to be throwing unhandled exceptions, I don't think we can use New Relic for these projects. |
I'm not sure how consumers of node-newrelic would view missing logs if this does happen. This feels like it is sweeping the issue under the rug and gives it less urgency. If logs are not getting where they need to go, I'd rather know about it. Maybe add console.warns (although that also feels dirty). |
@lasergoat We're definitely interested in fixing this -- are you able to reproduce this issue on command? With code you can share? If so we'd love to get a reproducible case -- once we have that we'll be better able to asses the full impact of ali-essam (generous) fix. |
@@ -1326,7 +1326,9 @@ function getSegment(obj) { | |||
*/ | |||
function getActiveSegment(obj) { | |||
var segment = this.getSegment(obj) | |||
if (segment && segment.transaction && segment.transaction.isActive()) { | |||
if (segment && segment.transaction && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should else this with some instrumentation to send a stack trace and other diagnostics to NewRelic so that all of the instances of this problem can be aggregated and give NewRelic devs more information about how to fix this and the code paths involved. That way though the data does get dropped in these cases, we learn something each time it happens and it can be quantified.
I doubt the built in object can be used in these cases, so you might need to implement something more custom, or instantiate a new instance, or something like that. Dirty but temporary and probably very useful.
With version Has anyone upgraded and are they still having issues? We'd like to continue to focus on the root cause(s) of the issue and won't be landing this PR as-is. We do appreciate the contribution. Please let us know in the other issue if this continues to be a problem. Issue: #281 Thank you, Michael |
@astormnewrelic sorry I didn't reply already. I wish I'd been more of a help for you. I ended up just leaving the agent in as-is, and forgetting about the issue. I haven't seen the error since. |
CHANGE LOG
INTERNAL LINKS
NOTES
fixes [Bug] unhandledException TypeError: segment.transaction.isActive is not a function #281