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

Support sending User Feedback without errors/exceptions #3981

Merged
merged 25 commits into from
Mar 5, 2025
Merged

Conversation

jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Feb 19, 2025

@jamescrosswell jamescrosswell marked this pull request as ready for review February 25, 2025 02:58
@bruno-garcia
Copy link
Member

Adding @aliu39 and @billyvg from the Replay team for review

<Label Text="Name" Margin="0,20,0,0" />
<Entry x:Name="NameEntry" Placeholder="Enter your name" />

<Button Text="Attach Screenshot" Clicked="OnAttachScreenshotClicked" Margin="0,20,0,0" />
Copy link
Member

Choose a reason for hiding this comment

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

Nice, we can use this to create a built-in Widget like @armcknight built for iOS

Or use bindings to use the native one. But with a MAUI implementation means we have it also on Windows and macOS

{
if (attachments.Count > 1)
{
logger?.LogWarning("Feedback can only contain one attachment. Discarding {0} additional attachments.",
Copy link
Member

Choose a reason for hiding this comment

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

Really? Why can it contain only one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

According to the developer docs, yes:

We only use attachments for the widget’s screenshot feature, which allows users to submit at most 1 screenshot per feedback.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a JS implementation thing. Or the FE is only showing one attachment. But ingestion wise we possibly support more than one (afaik we do in error events). @billyvg do you have context?

Copy link
Member

Choose a reason for hiding this comment

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

I know on the SDK/widget side of the UI, we wanted to limit it to 1 for simplicity, but I'm unsure about ingest cc @aliu39?

Copy link
Member

Choose a reason for hiding this comment

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

Ingest supports more than 1, but IIRC feedback UI only allows 1? Which is why I put that snippet in dev docs

Copy link
Member

Choose a reason for hiding this comment

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

I think we shouldn't have this limit in the SDK
We can instead add the ability to show them in the UI. WIll it break the UI today if we have more than 1 attachment?

Copy link
Member

Choose a reason for hiding this comment

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

Nope, I think it's just hidden. cc @ryan953 @michellewzhang

_options.LogInfo("Capturing event.");

var evt = new SentryEvent { Level = SentryLevel.Info };
evt.Contexts.Feedback = feedback;
Copy link
Member

Choose a reason for hiding this comment

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

I find this odd. Are we trying to find a way to attach the feedback to the event somehow?
Could the feedback inherit from SentryEvent instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not without changing all the other SDKs. This is just how the spec says we should be doing it.

@jamescrosswell jamescrosswell merged commit db56068 into main Mar 5, 2025
22 checks passed
@jamescrosswell jamescrosswell deleted the feedback branch March 5, 2025 05:22
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.

Support for Feedback Events Feedback captures are subject to sample rate
6 participants