Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable CaptureFailedRequests by default #2688

Merged
merged 5 commits into from Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,11 @@ API Changes:
- 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))


### Features

- Enable `CaptureFailedRequests`` by default ([2688](https://github.com/getsentry/sentry-dotnet/pull/2688))
bitsandfoxes marked this conversation as resolved.
Show resolved Hide resolved

## Unreleased

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentryOptions.cs
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
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