Package
Sentry
.NET Flavor
.NET
.NET Version
10.0.203
OS
Windows
OS Version
No response
Development Environment
Rider 2025.x (Windows)
Other Error Monitoring Solution
No
Other Error Monitoring Solution Name
No response
SDK Version
10.0
Self-Hosted Sentry Version
No response
Workload Versions
UseSentry or SentrySdk.Init call
// Should be unrelated to the issue
_initDisposable = SentrySdk.Init(o =>
{
o.Dsn = sentryKey;
o.CacheDirectoryPath = /* */;
o.IsGlobalModeEnabled = true;
o.TracesSampleRate = 1.0;
o.AddExceptionFilterForType<OperationCanceledException>();
o.DisableDiagnosticSourceIntegration();
o.DisableSystemDiagnosticsMetricsIntegration();
o.DisableWinUiUnhandledExceptionIntegration();
});
Steps to Reproduce
- Start a span
- Call
Span.SetData("my.array", ["test1", "test2", "test3").
- Finish the span, flush
- Find the span in the dashboard and observer raw JSON or empty value in the table
I tried to find the issue in the code, if it's obvious, and it seems to be due to missing array branch in the WriteDynamicValue method here
|
public static void WriteDynamicValue( |
I noticed this method has branches for dictionaries and some other complex type but not arrays.
And I also found there a workaround for my issue - implement a simple ISentryJsonSerializable wrapper.
Expected Result
"data" {
"my.array": [
"test1", "test2", "test3"
]
}
Actual Result
"data" {
"my.array": { }
}
Package
Sentry
.NET Flavor
.NET
.NET Version
10.0.203
OS
Windows
OS Version
No response
Development Environment
Rider 2025.x (Windows)
Other Error Monitoring Solution
No
Other Error Monitoring Solution Name
No response
SDK Version
10.0
Self-Hosted Sentry Version
No response
Workload Versions
UseSentry or SentrySdk.Init call
Steps to Reproduce
Span.SetData("my.array", ["test1", "test2", "test3").I tried to find the issue in the code, if it's obvious, and it seems to be due to missing array branch in the
WriteDynamicValuemethod heresentry-dotnet/src/Sentry/Internal/Extensions/JsonExtensions.cs
Line 492 in e99c3d1
I noticed this method has branches for dictionaries and some other complex type but not arrays.
And I also found there a workaround for my issue - implement a simple ISentryJsonSerializable wrapper.
Expected Result
Actual Result