Teach exception_detector.rb to deal with escaped tabs (\u0009) …#43
Teach exception_detector.rb to deal with escaped tabs (\u0009) …#43mbert wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
Conversation
…N streams of Java exceptions (GoogleCloudPlatform#33: Escaped characters U+0000..001F in JSON not dealt with correctly).
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
I signed the CLA. |
|
CLAs look good, thanks! |
|
@qingling128 Can we get someone to review this? It's got some easy to fix conflicts. It's been open a very long time. |
|
Sorry, this fell through the cracks. This plugin is designed to work with Stackdriver Error Reporting, which should recognize the resulting multiline message as a stack trace. I'm verifying this with the team right now, but I suspect that it won't recognize those Unicode escapes, even if the stack trace were joined into a single log entry. These Unicode escapes are unexpected, and should have been decoded by the JSON parser before they ever get to this plugin. If you have a simple repro case for producing such escapes in a Java stack trace, let's debug that (in #33) and ensure that this plugin sees the original tab instead. |
|
For the record, a self-service way to verify how Error Reporting will handle your message is to pipe it into the following command: gcloud beta error-reporting events report \
--service manual \
--service-version test-version \
--project=$(gcloud config get-value project) \
--message-file=/dev/stdinand check the results on the Error Reporting page in the Cloud Console. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
1 similar comment
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
This PR fixes parts of #33: Tabs in Java stacktraces are dealt with correctly. The unit test has been extended accordingly.
Missing:
With this patch applied collecting Java stacktraces from a log stream in a Kubernetes cluster works for me. Without it does not.