Skip to content

Commit

Permalink
feat: Enable CaptureFailedRequests by default (#2688)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes authored Oct 3, 2023
1 parent 08d6926 commit ede4a04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ public bool ReportAssemblies
/// <para>Also <see cref="FailedRequestTargets"/> can be used to filter to match only certain request URLs.</para>
/// <para>Defaults to false due to PII reasons.</para>
/// </summary>
public bool CaptureFailedRequests { get; set; }
public bool CaptureFailedRequests { get; set; } = true;

/// <summary>
/// <para>The SDK will only capture HTTP Client errors if the HTTP Response status code is within these defined ranges.</para>
Expand Down
4 changes: 2 additions & 2 deletions test/Sentry.Tests/SentryOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ede4a04

Please # to comment.