-
Notifications
You must be signed in to change notification settings - Fork 505
METRON-2197 Add debugging info output for Solr queries #1475
Conversation
| LOG.error(msg, e); | ||
| throw new InvalidSearchException(msg, e); | ||
| } | ||
|
|
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.
The only thing that comes to mind with this, is if we have multiple people/ui/api's doing queries at the same time when we are in a 'state' or something, it is going to be a mess. I don't know what context you can add though.
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.
Hm, that's true. The main target for this change is folks doing performance tuning, but I think you're right. If you turn this on to see prod runtime issues, having many clients is going to show these logs in a mixed order. How about a random hash to prepend the lines with a random ID? At least the info can be grouped then. Or I could build this into one big massive string so there's only one log entry?
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.
We can add that as a follow on really, I just wanted to point that out. We should be explicit about the intended use case here.
|
@ottobackwards I tinkered with a reformat. Here's what it looks like if I merge them into a single debug statement The original looked like this. To your point, those multiple lines could get interwoven with other searches going on simultaneously. I like the joined version better. |
|
+1, this looks great. Thanks! |
Contributor Comments
https://issues.apache.org/jira/browse/METRON-2197
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:
For code changes:
Have you included steps to reproduce the behavior or problem that is being changed or addressed?
Have you included steps or a guide to how the change may be verified and tested manually?
Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
n/a Have you written or updated unit tests and or integration tests to verify your changes?
n/a If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
For documentation related changes:
n/a Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via
site-book/target/site/index.html:n/a Have you ensured that any documentation diagrams have been updated, along with their source files, using draw.io? See Metron Development Guidelines for instructions.
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.