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

fix: Process user reports in separate group #2981

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Jan 22, 2024

Process user reports in separate processing group.

Related #2980

@olksdr olksdr self-assigned this Jan 22, 2024
@olksdr olksdr requested a review from a team as a code owner January 22, 2024 18:29
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

works with my local test.

@olksdr
Copy link
Contributor Author

olksdr commented Jan 22, 2024

@JoshFerge thanks for testing this!

@@ -192,6 +192,17 @@ impl ProcessingGroup {
))
}

// Extract user report and user feedback.
let report_items = envelope.take_items_by(|item| {
matches!(item.ty(), &ItemType::UserReport | &ItemType::ClientReport)
Copy link
Member

Choose a reason for hiding this comment

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

Client reports are very different from user reports: They carry outcomes, so like metrics they can be processed either completely separately or in a common envelope with other ungrouped items.

The similarity in the name ClientReport and UserReport is merely coincidental.

@@ -192,6 +192,17 @@ impl ProcessingGroup {
))
}

// Extract user report and user feedback.
let report_items = envelope.take_items_by(|item| {
matches!(item.ty(), &ItemType::UserReport | &ItemType::ClientReport)
Copy link
Member

Choose a reason for hiding this comment

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

User reports are items that require event payloads, hence should be processed in the same group as attachments (or standalone attachments). We should follow up with refactoring the standalone attachment group above (really the "doesn't have an event"-group) to cover all items that have requires_event set to true.

Note that the requires_event flag means that these items are existentially bound to an event instance in Sentry. That's the reason they are grouped together with events: If the event is dropped, so will be the other items. However, that doesn't mean the event payload must be in the same envelope. We should verify that the other pipelines handle that correctly.

@jan-auer jan-auer merged commit c6be04a into master Jan 22, 2024
20 checks passed
@jan-auer jan-auer deleted the fix/split-envelope-by-creates-event branch January 22, 2024 20:46
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