StringIO Parameters Not Being Rewound
When capture_params is enabled, StringIO is being treated as an Enumerable by the agent and the first 20 lines are read. Having that data in RPM is surely helpful, but the StringIO is not rewound when the agent is finished. The next piece of code to use the StringIO will find it inexplicably starting at line 21 when it should be at line 1.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company marked this problem solved.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?For now, I've added this to my copy of the agent:
Index: lib/new_relic/agent/collection_helper.rb
===================================================================
--- lib/new_relic/agent/collection_helper.rb (revision 7716)
+++ lib/new_relic/agent/collection_helper.rb (working copy)
@@ -25,6 +25,7 @@
new_values << normalize_params(item)
break if (count += 1) > 20
end
+ params.rewind if params.is_a?(StringIO)
new_values
else
truncate(flatten(params))
-
Inappropriate?Ian, sorry for the delayed response, however you will be happy to know that with the information you provided we were able to reproduce the problem and implement a fix. We took a more conservative approach, which is not to modify the StringIO object at all and omit the display of its contents in errors and transaction traces.
The fix goes into 2.8.6. It's available right now as a beta and we'd greatly appreciate it if you'd try it out.
http://newrelic.rubyforge.org/svn/bet...
I’m confident
1 person says
this solves the problem
Loading Profile...



EMPLOYEE