bugsnag / bugsnag-go

Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
https://docs.bugsnag.com/platforms/go
MIT License
203 stars 69 forks source link

Sanitize should also handler json and []byte #226

Closed veqryn closed 5 months ago

veqryn commented 5 months ago

Goal

We log in json, and send details and types to both our logger and also to bugsnag that are json.RawMessage, have a MarshalJSON method, or are byte slices.

Design

Good place for it.

Changeset

See PR.

Testing

Added test cases to cover the new functionality.

DariaKunoichi commented 5 months ago

@veqryn Hi, thanks for preparing a PR.

After you add it I will try authorizing the CI so maybe I won't have to cherry pick your commits into another PR.

veqryn commented 5 months ago

Sure. Do you have any edge cases in mind?

DariaKunoichi commented 5 months ago

Nil pointers check for sure, like we do here. And maybe try nesting them in a map? Like here.

veqryn commented 5 months ago

@DariaKunoichi done

mclack commented 4 months ago

Hi @veqryn

Thanks for your contributions here. This has now been added in our v2.4.0 release.