Skip to content

Conversation

@mbert
Copy link

@mbert mbert commented Jul 23, 2018

This PR fixes parts of #33: Tabs in Java stacktraces are dealt with correctly. The unit test has been extended accordingly.

Missing:

  • Python and Ruby (of which I don't know enough to start modifying regular expressions)
  • Other escaped characters if that plays a role at all (depends on what stack traces in other languages may look like)

With this patch applied collecting Java stacktraces from a log stream in a Kubernetes cluster works for me. Without it does not.

…N streams of Java exceptions (GoogleCloudPlatform#33: Escaped characters U+0000..001F in JSON not dealt with correctly).
@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@mbert
Copy link
Author

mbert commented Jul 23, 2018

I signed the CLA.

@googlebot
Copy link

CLAs look good, thanks!

@DandyDeveloper
Copy link

@qingling128 Can we get someone to review this? It's got some easy to fix conflicts.

It's been open a very long time.

@igorpeshansky
Copy link
Contributor

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.

@igorpeshansky
Copy link
Contributor

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/stdin

and check the results on the Error Reporting page in the Cloud Console.

@googlebot
Copy link

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
@googlebot
Copy link

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.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants