Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize should also handler json and []byte #226

Merged
merged 4 commits into from Apr 12, 2024

Conversation

veqryn
Copy link
Contributor

@veqryn veqryn commented Apr 10, 2024

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
Copy link
Contributor

@veqryn Hi, thanks for preparing a PR.

  • Can I ask you to add more unit testing around edge cases?
  • Also, please change the branch you want to merge to from master to next as this is our release process.

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

@mclack mclack added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Apr 11, 2024
@veqryn
Copy link
Contributor Author

veqryn commented Apr 11, 2024

Sure. Do you have any edge cases in mind?

@DariaKunoichi
Copy link
Contributor

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

@veqryn veqryn changed the base branch from master to next April 12, 2024 04:59
@veqryn
Copy link
Contributor Author

veqryn commented Apr 12, 2024

@DariaKunoichi done

@DariaKunoichi DariaKunoichi self-requested a review April 12, 2024 10:13
@DariaKunoichi DariaKunoichi merged commit 316933f into bugsnag:next Apr 12, 2024
25 checks passed
@veqryn veqryn deleted the veqryn/marshal-json branch April 13, 2024 03:39
@mclack mclack removed the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Apr 15, 2024
@DariaKunoichi DariaKunoichi mentioned this pull request Apr 15, 2024
DariaKunoichi added a commit that referenced this pull request Apr 15, 2024
## 2.4.0 (2024-04-15)

### Enhancements

* Sanitize for metadata should also handler json and []byte
  [#226](#226)
  [Chris Duncan](https://github.com/veqryn)
@mclack mclack added the released This feature/bug fix has been released label Apr 16, 2024
@mclack
Copy link

mclack commented Apr 16, 2024

Hi @veqryn

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This feature/bug fix has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants