-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat(feedback): add User Feedbacks as Events #2604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving some questions/points from a preliminary review:
- Since we're adding a new data category, we should update the C ABI headers --
make header
inrelay-cabi
should work. We should also update the py/Changelog. - What's the plan for current feedback items that live as attachments?
- Should these new feedback items go into a new Kafka topic?
- See my comment below on UserReport -> UserFeedback transition.
@@ -108,6 +114,7 @@ impl DataCategory { | |||
Self::Monitor => "monitor", | |||
Self::Span => "span", | |||
Self::MonitorSeat => "monitor_seat", | |||
Self::UserReportV2 => "user_report_v2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update the from_name
function above.
/// Currently standardized on name UserReportV2 to avoid clashing with the old UserReport. | ||
/// TODO(jferg): Rename this to UserFeedback once old UserReport is deprecated. | ||
UserReportV2 = 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on when UserReport -> UserFeedback transition happens, we may need to support both alternatives to avoid future breaking changes. Have we considered this? Is there any ETA on the deprecation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use UserFeedback
right away? I agree with Iker that renaming later could bring extra complexity and possible compatibility issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when discussing with @jan-auer over initial call, he called out to not have it so there are "synonyms" in the code. I can change to UserFeedback if that is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more important than the internal naming is making sure that the serialized string representations in the public interface do not have to be changed, e.g "user_report_v2"
for the data category.
The internal names of the types are less important, but I did a case insensitive search for "feedback" and found only a few references in comments, so I would personally go for the new naming straight away, but I'll leave it up to you. cc @jan-auer
@@ -27,6 +27,7 @@ pub use reprocessing::*; | |||
pub use response::*; | |||
pub use runtime::*; | |||
pub use trace::*; | |||
pub use user_report_v2::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*
exports above aren't ideal, could we only export the types we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i include that refactor in this PR, or could I follow up with that? not sure how you all like to split changes like that into separate PRs or not.
@@ -546,6 +551,7 @@ impl Item { | |||
ItemType::Statsd | ItemType::MetricBuckets => None, | |||
ItemType::FormData => None, | |||
ItemType::UserReport => None, | |||
ItemType::UserReportV2 => None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means no outcomes will be generated. Is this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now, yes. will change this once we have data flowing through system and we're closer to alpha etc.
/// Currently standardized on name UserReportV2 to avoid clashing with the old UserReport. | ||
/// TODO(jferg): Rename this to UserFeedback once old UserReport is deprecated. | ||
UserReportV2 = 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use UserFeedback
right away? I agree with Iker that renaming later could bring extra complexity and possible compatibility issues.
Co-authored-by: Iker Barriocanal <32816711+iker-barriocanal@users.noreply.github.com>
Co-authored-by: Iker Barriocanal <32816711+iker-barriocanal@users.noreply.github.com>
done.
see PR description:
No -- we'll process them in our ingest consumer conditioned on the event type. this was chosen over a separate Kafka topic in conversation w/ @jan-auer last week.
Replied, when Jan and I spoke, there was a decision to avoid synonyms in the code. can change if ya'll would like -- I don't have a strong opinion here. also see PR description:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending the relay-cabi
update, LGTM. Thanks a lot for working on this PR!
CHANGELOG.md
Outdated
@@ -30,6 +30,7 @@ | |||
- Accept spans needed for the mobile Starfish module. ([#2570](https://github.com/getsentry/relay/pull/2570)) | |||
- Extract size metrics and blocking status tag for resource spans. ([#2578](https://github.com/getsentry/relay/pull/2578)) | |||
- Add a setting to rollout ingesting all resource spans. ([#2586](https://github.com/getsentry/relay/pull/2586)) | |||
- Add User Feedback Ingestion. ([#2604](https://github.com/getsentry/relay/pull/2604)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update py/changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please move this to the ## Unreleased
section at the top of this file.
py/CHANGELOG.md
Outdated
- Remove event breadcrumbs dating before January 1, 1970 UTC. ([#2635](https://github.com/getsentry/relay/pull/2635)) | ||
- Add `locale` ,`screen_width_pixels`, `screen_height_pixels`, and `uuid` to the device context. ([#2640](https://github.com/getsentry/relay/pull/2640)) | ||
- Add `scraping_attempts` field to the event schema. | ||
([#2575](https://github.com/getsentry/relay/pull/2575)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the autoformatter run wild here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed! not sure why my markdown formatter does this.
@iker-barriocanal could you take a look again? need your approval since you requested changes. |
@@ -108,6 +114,7 @@ impl DataCategory { | |||
Self::Monitor => "monitor", | |||
Self::Span => "span", | |||
Self::MonitorSeat => "monitor_seat", | |||
Self::UserReportV2 => "feedback", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this string to the from_name
above before merging, otherwise Relay won't recognize the data category when deserializing.
Relay changes for the revamped User Feedback feature. User Feedbacks (Known as
UserFeedbackV2
), will be events that flow through our system instead of attachments. See here for more information on the tech spec (and the link at the bottom for what we do once they're ingested).Note that within this code, we're calling it
UserReportV2
. This is to avoid confusion with the existingUserReport
. A PR to shim the previousUserReports
as newUserReportV2
's will follow, at which point we'll rename this in the code to beUserFeedback
. The stringfeedback
is used for the context and ItemType / EventType parsing.UserReportV2Ingest
. This is backed by options https://github.com/getsentry/getsentry/issues/11573UserReportV2
UserReportV2
UserReportV2
UserReportV2Context
that for now contains two properties,contact_email
(no pii stripping), and themessage
which contains the feedback text.