-
Notifications
You must be signed in to change notification settings - Fork 930
ARTEMIS-5434 Use full exception name in exceptions #5639
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
Conversation
What do you mean by "exception header" in this context? The change in the PR is only touching the Are you saying that because the |
Some context how Google Error Reporting works. It analyzes all log messages and tries to find exceptions in them. If exception is found monitoring agent is notified about new problem within an environment. If the same exception is found it is grouped and produces histogram, so monitoring agent can clearly see when the problem started to appear. See the following screenshot as an example: All of this is great except the part how Google Error Reporting differentiates between what is the same error and what is not. I'm not sure if it takes into account what is written after exception name (in Artemis case the part between []), but it definitely looks into full package name in the first line of the exception. If This PR also would make exception format more inline with what how exceptions are returned from standard Java libraries. |
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.
LGTM
For Artemis users with a standard logging configuration this will not change anything, since the %ex
pattern converter does not call the toString()
method of the exception.
A change in the formatting of stacktraces in logs will occur if apache/logging-log4j2#3623 is implemented.
artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
Outdated
Show resolved
Hide resolved
Just to clarify...In your environment you have exceptions with the same class names as those in ActiveMQ Artemis? |
For ActiveMQ Artemis not really. I just was going through all our environments and application packages, implementing JSON logging for proper integration with Google Cloud Logging. During this process I noticed the same error grouping issue with other Java software, not related to Artemis, which uses more generic exception names and also doesn't provide FQCN in the exception. I have already fixed this in those packages. |
@ViliusS, thanks for the clarification. Set this to "Ready for review" once you've made all your changes, and I'll take another look. |
Please make sure you squash all your commits. |
I usually try to avoid squashing because then review comments get disconnected from the changes, and it should be possible to squash during merge. But if that's really needed it is done now. |
In what way do review comments get disconnected from the changes? |
If you go here https://github.com/apache/activemq-artemis/pull/5639/files you will see that there is no comment from Piotr. After force-pushing comments remain only visible in Conversation thread here, but if you want to see them in full file context, or if you want them to be shown for the next reviewer, they are now gone in Files Changed tab. |
If the PR is longer you also lose the possibility of reviewing just the recent changes to the PR and you need to read it from the beginning. |
I hope that I'm not breaking any backward compatibility here but it would be great to have a full package name in the exception header. Currently Artemis exceptions only include the short name of the exception. On logging systems where exceptions are caught and tracked if they are repeating errors (like for example Google Error Reporting), this groups different Artemis exceptions into single error group.
See apache/logging-log4j2#3586 (comment) for more information and screenshots.