-
Notifications
You must be signed in to change notification settings - Fork 600
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
Errors that are expected by way of expected_status_codes should not impact Apdex #2594
Comments
If an error is either expected (which still creates an entry in the Errors Inbox) or ignored (which does not), the transaction's Apdex should not factor in the error. A bug was discovered involving errors that were expected by way of their HTTP response codes that would cause those errors to impact Apdex. Errors that were expected via the agent's Noticed Errors API would correctly not impact Apdex, but HTTP response code based expected errors would incorrectly do so. Now ignored errors and both kinds of expected errors will correctly not impact Apdex when observed during a transaction. resolves #2594
Thank you so much for taking the time and digging into the problem. :) While the linked PR #2619 would be good enough for what we need, as far as I can see this would still let |
Hi @florianpilz! I'm very glad to hear that the linked PR will be helpful! As for expected error classes and error messages, I believe those are now covered as well. I think the code changes cover everything, but my text summary was insufficient. Previously, the only way an expected error would not impact Apdex would be if the def expected?(ex, status_code = nil)
@expected_classes.include?(ex.class.name) ||
(@expected_messages.key?(ex.class.name) &&
@expected_messages[ex.class.name].any? { |m| ex.message.include?(m) }) ||
@expected_status_codes.include?(status_code.to_i)
end That method will take care of checking for configured expected classes and messages by looking at the exception argument, and then check for an expected HTTP status code by looking at the optional status code argument. The inclusion of these So I think what happened is that the code in the PR does everything we want, but my description was limited by only mentioning the status codes. If after taking another look you disagree, please let me know and I'd be happy to investigate farther. We'll keep you posted via comments on this issue for when these changes make it into a new agent gem release. |
@florianpilz I have updated the PR description text, the CHANGELOG, and the source code comments. Thanks very much for pointing out that the error classes and error messages are also possible ways to expect errors! See acb8297 |
Hi @florianpilz. The PR has now been approved and merged, so the bugfix should go out in the next release of the New Relic Ruby agent. Thank you again for bringing this issue to our attention! |
Really nice! You are right, I only got distracted by HTTP codes being explicitly passed. Makes all sense now and looking forward to the next release. 🎉 ❤️ |
We have reports that errors with status codes matching specified
expected_status_codes
values are correctly appearing in the Errors Inbox as "expected", but are negatively impacting Apdex.This relevant specification text confirms that expected errors should not impact Apdex.
We'll need to determine where in the agent or back-end the denotation of an error as expected fails to prevent that error from impacting Apdex.
NOTE: The use of
ignore_status_codes
works as a workaround. Ignored errors are seen as not impacting Apdex. The drawback of the workaround is that ignored errors are not delivered to the Errors Inbox.The text was updated successfully, but these errors were encountered: