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

ref(store): Emit event errors for unknown breadcrumb keys #824

Merged
merged 5 commits into from
Oct 30, 2020

Conversation

jan-auer
Copy link
Member

Emits normalization errors and event errors for unknown attributes in breadcrumbs.

See discussion on getsentry/sentry-python#884 (comment).

@jan-auer jan-auer requested review from untitaker and a team October 29, 2020 16:31
@jan-auer jan-auer self-assigned this Oct 29, 2020
@jan-auer
Copy link
Member Author

I'm not so happy about the code duplication between process_event and process_breadcrumb, but it's surprisingly hard to factor out the common bits into a function, and makes everything more complicated than duplicating code.

@lobsterkatie
Copy link
Member

Thanks, @jan-auer!

Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably use before_process, after_process or process_other and have customized logic in there (matching on path or value type) to factor out the logic. However I think this is cleaner.

In fact process_other was introduced for this purpose IIRC.

@jan-auer
Copy link
Member Author

In fact process_other was introduced for this purpose IIRC.

Correct.

You can probably use before_process, after_process or process_other and have customized logic in there (matching on path or value type) to factor out the logic. However I think this is cleaner.

Not sure how that works, since we'd need a before_process_breadcrumb etc. Actually, the only thing we need is a method generic over V: ProcessValue, but I didn't feel it was worth the complications.

@jan-auer jan-auer merged commit 6de14d4 into master Oct 30, 2020
@jan-auer jan-auer deleted the ref/breadcrumb-errors branch October 30, 2020 14:55
jan-auer added a commit that referenced this pull request Oct 30, 2020
* master:
  ref(server): Validate user reports (#823)
  ref(store): Emit event errors for unknown breadcrumb keys (#824)
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.

3 participants