sentry-go icon indicating copy to clipboard operation
sentry-go copied to clipboard

Unmarshalable data behaves poorly

Open flimzy opened this issue 5 years ago • 2 comments

I noticed the following in a few of our event logs:

Original event couldn't be marshalled. Succeeded by stripping the data that uses interface{} type. Please verify that the data you attach to the scope is serializable.

A couple of observations/suggestions (which I'm happy to implement in a PR if desired):

  1. It would be very helpful to include the original error message. I.e.
	partialMarshallMessage := fmt.Sprintf("Original event couldn't be marshaled: %s. Succeeded by stripping the data " +
		"that uses interface{} type. Please verify that the data you attach to the scope is serializable.", err)
  1. The message seems to indicate that only some data will be stripped, but it strips all Extra data. It would not be difficult (although efficiency would suffer) to loop through each element of Extra, and strip only those that don't marshal.

2 would be far less important if 1 were implemented, to make debugging simpler. But both might be ideal.

Thoughts?

flimzy avatar Apr 24 '20 13:04 flimzy

Ugh, sorry for the extraneous closing of this. Applying the patch in #213 to our private repo unintentionally closed this.

flimzy avatar Apr 24 '20 14:04 flimzy

Let's do "option 1" first. Thanks for sending PRs for the two variations. I took a chance to try to make the info message more concise and still mention specifically which fields got dropped in #258, replacing #214.

We can ship "option 2" later.

rhcarvalho avatar Jul 06 '20 21:07 rhcarvalho

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Dec 07 '22 09:12 github-actions[bot]