-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Feedback captures are subject to sample rate #3604
Comments
Hi @codecat, Thanks for getting in touch. I can't see logically how this might be happening though. The API you're calling simply delegates to the Hub: sentry-dotnet/src/Sentry/SentrySdk.cs Lines 501 to 502 in 76e9f66
And the Hub in turn passes the feedback on to the SentryClient: sentry-dotnet/src/Sentry/Internal/Hub.cs Lines 456 to 471 in 5ff8acc
And the SentryClient simply turns the feedback into an envelope and enqueues this for delivery: sentry-dotnet/src/Sentry/SentryClient.cs Lines 85 to 95 in 5b35d8e
So, at no stage, is any rate limiting implemented by the SDK for User Feedback. The only thing I can think is that maybe the sentry server is dropping those events for some reason. In that case, you might see some record of that in the "Stats" tab in your Sentry portal. |
Thanks for looking into this. My initial thought was that it might be related to the attached message (using On the Stats page, I see |
After adding some logging I can confirm this is indeed what is happening:
|
Aha, OK that makes sense. I assume User Feedback is designed to be supplied with Exception Events... so after capturing an exception you could then capture some User Feedback and submit this (along with the id of the Exception that was captured). Are you trying to achieve something different? |
We have a special Feedback dialog that users can open on demand (through a button on our UI) that the user can choose to optionally attach logs to. It looks like this: In addition, we have some other parts of our UI which don't necessarily generate an exception, but do generate user feedback (eg. in our case, a user receives a warning from us about something, but they think it's a false positive, so they click on a button to indicate as such), which we really do want to hear about. Are we misunderstanding the use case of Sentry's User Feedback, or is this indeed a problem/bug in the .Net SDK? |
User feedback was implemented before I started working on the SDK so I'm learning here at the same time as you, but it looks like initially User Feedback events did have to be associated with events and so the code in the SDK is doing what it's supposed to. However, since then, a new format has been introduced that allows User Feedback to be sent independently of events... and presumably this newer User Feedback mechanism hasn't yet been implemented in the .NET SDK. So I think you've understood the intent of the new User Feedback model but the .NET SDK is still built using the old APIs. I've raised the following issue for prioritisation: cc: @bitsandfoxes |
@jamescrosswell this could be a good next project. And getting a widget for MAUI would be nice too. Based on the work done by Andrew on iOS, or Denis on Flutter. |
Package
Sentry
.NET Flavor
.NET
.NET Version
8.0.8
OS
Windows
SDK Version
4.9.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
Initialize Sentry using:
Then capture multiple feedback items, as per the documentation:
(You can also do these manually multiple times instead of in a for loop, which is what we actually tested.)
Expected Result
We would expect all points of feedback to not be subject to the sample rate, as described here.
Actual Result
We are only seeing some of the feedback points come through. (And one duplicate one w/o a linked issue in the below screenshot, strangely enough.)
As a workaround, we tested re-initializing the Sentry SDK with a sampling rate of 100% prior to users submitting feedback, which works. This is not an ideal scenario, so I hope we can see this fixed.
The text was updated successfully, but these errors were encountered: