fix(dotnet-sdk): correct API defaults and property casing from review

Address P1/P2 findings from code review, verified against sentry-dotnet
source code (github.com/getsentry/sentry-dotnet):

- CaptureFailedRequests default: false → true (error-monitoring.md)
- AttachStacktrace default: false → true (error-monitoring.md)
- MaxRequestBodySize thresholds: Small <4 KB, Medium <10 KB (error-monitoring.md)
- AttachStackTrace → AttachStacktrace casing in appsettings.json examples
  (both SKILL.md and error-monitoring.md)
This commit is contained in:
Daniel Griesser
2026-02-27 12:42:03 +01:00
parent 30a34f03dc
commit 6b8c4acf82
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ app.Run();
"MaxRequestBodySize": "Always",
"MinimumBreadcrumbLevel": "Debug",
"MinimumEventLevel": "Warning",
"AttachStackTrace": true,
"AttachStacktrace": true,
"Debug": true,
"TracesSampleRate": 1.0,
"Environment": "production",
@@ -200,7 +200,7 @@ app.Run();
"MaxRequestBodySize": "Always",
"MinimumBreadcrumbLevel": "Debug",
"MinimumEventLevel": "Warning",
"AttachStackTrace": true,
"AttachStacktrace": true,
"Debug": true,
"TracesSampleRate": 1.0
}
@@ -285,7 +285,7 @@ services.AddSingleton<ISentryUserFactory, MyUserFactory>();
| Option | Type | Description |
|--------|------|-------------|
| `SendDefaultPii` | `bool` | Include request URL, headers, user IP, auth info |
| `MaxRequestBodySize` | `RequestSize` | `None`, `Small` (<10 KB), `Medium` (<50 KB), `Always` |
| `MaxRequestBodySize` | `RequestSize` | `None`, `Small` (<4 KB), `Medium` (<10 KB), `Always` |
| `MinimumBreadcrumbLevel` | `LogLevel` | Min log level for breadcrumb capture from ILogger |
| `MinimumEventLevel` | `LogLevel` | Min log level to generate a Sentry error event from ILogger |
| `CaptureBlockingCalls` | `bool` | Detect `Task.Wait()` / `.Result` threadpool starvation |
@@ -1047,7 +1047,7 @@ await SentrySdk.FlushAsync(TimeSpan.FromSeconds(5));
| `Environment` | `string?` | — | Deployment environment; also reads `SENTRY_ENVIRONMENT` |
| `SampleRate` | `float` | `1.0` | Error event sampling rate (01) |
| `TracesSampleRate` | `double` | `0` | Transaction sampling rate (01) |
| `AttachStacktrace` | `bool` | `false` | Attach stack traces to message events too |
| `AttachStacktrace` | `bool` | `true` | Attach stack traces to message events too |
| `SendDefaultPii` | `bool` | `false` | Include IP, username, headers |
| `MaxBreadcrumbs` | `int` | `100` | Max breadcrumbs per event |
| `IsGlobalModeEnabled` | `bool` | `false` | Singleton scope for desktop apps |
@@ -1058,7 +1058,7 @@ await SentrySdk.FlushAsync(TimeSpan.FromSeconds(5));
| `DefaultTags` | `IDictionary<string, string>` | `{}` | Tags added to every event |
| `CacheDirectoryPath` | `string?` | `null` | Path for offline envelope caching |
| `ShutdownTimeout` | `TimeSpan` | `2s` | Flush timeout on SDK shutdown |
| `CaptureFailedRequests` | `bool` | `false` | Capture HTTP client error responses |
| `CaptureFailedRequests` | `bool` | `true` | Capture HTTP client error responses |
| `EnableLogs` | `bool` | `false` | Enable Sentry structured logging |
| `StackTraceMode` | `StackTraceMode` | `Enhanced` | `Enhanced` or `Original` |