-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Conversation
…ry-dotnet into feedback
<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" /> |
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.
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.", |
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.
Really? Why can it contain only one?
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.
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.
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 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?
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 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?
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.
Ingest supports more than 1, but IIRC feedback UI only allows 1? Which is why I put that snippet in dev docs
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 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?
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.
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; |
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 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?
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.
Not without changing all the other SDKs. This is just how the spec says we should be doing it.
Resolves #3605:
Related
Example