Feedback length always 0
Package
Sentry
.NET Flavor
.NET
.NET Version
9.0.305
OS
Windows
OS Version
11
Development Environment
Visual Studio v17.x
SDK Version
5.15.1
Self-Hosted Sentry Version
No response
Workload Versions
UseSentry or SentrySdk.Init call
SentrySdk.Init(options => { options.Dsn = options.Debug = true; options.AutoSessionTracking = true; options.IsGlobalModeEnabled = true; options.SampleRate = 1.0f; options.AttachStacktrace = true; options.SendDefaultPii = false; options.StackTraceMode = StackTraceMode.Enhanced; options.TracesSampleRate = 1.0; options.DisableAppDomainUnhandledExceptionCapture(); options.DisableUnobservedTaskExceptionCapture(); options.DisableAppDomainProcessExitFlush(); options.SendClientReports = true; options.SetBeforeSend(OnBeforeSend); options.CacheDirectoryPath = options.MaxCacheItems = options.InitCacheFlushTimeout = TimeSpan.Zero; options.DiagnosticLogger = options.DeduplicateMode = DeduplicateMode.All; }
Steps to Reproduce
When trying to capture feedback it never shows up in Sentry(.io), looking at the json request the length is always 0. I assume the reports get dropped.
I have tried
// Vanilla
SentrySdk.CaptureFeedback("test", "[email protected]");
// With coupled events
var eventId = SentrySdk.CaptureMessage("An example event");
SentrySdk.CaptureFeedback(new SentryFeedback(
message: "this is a sample user feedback",
contactEmail: "[email protected]",
name: "test",
replayId: null,
url: null,
associatedEventId: eventId
));
// With coupled event and attachment
SentrySdk.CaptureFeedback(new SentryFeedback("example with attachent", contactEmail: "[email protected]", associatedEventId: eventId), scope =>
{
scope.AddAttachment(stream.ToArray(), "AttachementFileName.zip");
});
all yielding to the same result, the feedback length is always 0, the attachment length is also 0. Note that "An example event" does show up in Sentry, but without attachment or coupled feedback. Note that i do get "HttpTransport: Envelope '[retracted]' successfully sent." in the log for all of them, but the content shows the length is 0 except for the event.
I have verified the provided array of bytes for the attachment contains data (and i not obscenely large).
Expected Result
The feedback shows up, with attachment, in Sentry.
Actual Result
The generated json content always has length 0 and the feedback does not show up in Sentry.
Hi @trovialdo, thanks for the report. I'm not able to reproduce this however.
Do you think you could provide a minimum reproducible example (some code that I can run that demonstrates the issue)?
For an example of some code that does work, see: https://github.com/getsentry/sentry-dotnet/blob/44b7cdfbbb08c0c992cec274e4f39abd613811f8/samples/Sentry.Samples.Console.Customized/Program.cs#L151-L158
Thanks for the swift reply, i will try to do so next week