diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ad145e7b..f62b71173e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ API Changes: - ISpanContext was removed. Use ITraceContext instead. ([#2668](https://github.com/getsentry/sentry-dotnet/pull/2668)) - Removed IHasTransactionNameSource. Use ITransactionContext instead. ([#2654](https://github.com/getsentry/sentry-dotnet/pull/2654)) - Adding `Distribution` to `IEventLike` ([#2660](https://github.com/getsentry/sentry-dotnet/pull/2660)) +- Enable `CaptureFailedRequests` by default ([2688](https://github.com/getsentry/sentry-dotnet/pull/2688)) ## Unreleased diff --git a/src/Sentry/SentryOptions.cs b/src/Sentry/SentryOptions.cs index 953059afd4..6b7f8ea8df 100644 --- a/src/Sentry/SentryOptions.cs +++ b/src/Sentry/SentryOptions.cs @@ -664,7 +664,7 @@ public bool ReportAssemblies /// Also can be used to filter to match only certain request URLs. /// Defaults to false due to PII reasons. /// - public bool CaptureFailedRequests { get; set; } + public bool CaptureFailedRequests { get; set; } = true; /// /// The SDK will only capture HTTP Client errors if the HTTP Response status code is within these defined ranges. diff --git a/test/Sentry.Tests/SentryOptionsTests.cs b/test/Sentry.Tests/SentryOptionsTests.cs index 9edea7e0e4..a73f941b2c 100644 --- a/test/Sentry.Tests/SentryOptionsTests.cs +++ b/test/Sentry.Tests/SentryOptionsTests.cs @@ -175,10 +175,10 @@ public void IsPerformanceMonitoringEnabled_EnableTracing_False_TracesSampler_Pro } [Fact] - public void CaptureFailedRequests_ByDefault_IsFalse() + public void CaptureFailedRequests_ByDefault_IsTrue() { var sut = new SentryOptions(); - Assert.False(sut.CaptureFailedRequests, "CaptureFailedRequests should be false by default to protect potentially PII (Privately Identifiable Information)"); + Assert.True(sut.CaptureFailedRequests); } [Fact]