Skip to content

subscriber: record error sources in fmt layer with JSON format #3317

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

stijnherfst
Copy link

From #2797 but rebased onto the main branch.

Motivation

Hi, all. As proposed in #2784, this PR records the error sources in fmt layer with JSON format, for both spans and events.

Solution

  Override record_error of fmt::JsonVisitor for span fields.
  Override record_error of serde::SerdeMapVisitor for event fields.
  Use a new field named {field}.sources to record the sources as a list.
  Add a unit test.

Thanks to the original author @BugenZhao!

Co-authored-by: BugenZhao <i@bugenzhao.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants