Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Redact Authorization headers before sending events to Sentry ([#4164](https://github.com/getsentry/sentry-dotnet/pull/4164))
- Remove Strong Naming from Sentry.Hangfire ([#4099](https://github.com/getsentry/sentry-dotnet/pull/4099))
- Increase `RequestSize.Small` threshold from 1 kB to 4 kB to match other SDKs ([#4177](https://github.com/getsentry/sentry-dotnet/pull/4177))

### Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public ProtobufRequestExtractionDispatcher(IEnumerable<IProtobufRequestPayloadEx

switch (size)
{
case RequestSize.Small when request.ContentLength < 1_000:
case RequestSize.Small when request.ContentLength < 4_000:
case RequestSize.Medium when request.ContentLength < 10_000:
case RequestSize.Always:
_options.Log(SentryLevel.Debug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public RequestBodyExtractionDispatcher(IEnumerable<IRequestPayloadExtractor> ext

switch (size)
{
case RequestSize.Small when request.ContentLength < 1_000:
case RequestSize.Small when request.ContentLength < 4_000:
case RequestSize.Medium when request.ContentLength < 10_000:
case RequestSize.Always:
_options.LogDebug("Attempting to read request body of size: {0}, configured max: {1}.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public void ExtractPayload_ExtractorNull_ReturnsNull()

[Theory]
[InlineData(RequestSize.None, 1, false)]
[InlineData(RequestSize.Small, 999, true)]
[InlineData(RequestSize.Small, 10_000, false)]
[InlineData(RequestSize.Small, 3_999, true)]
[InlineData(RequestSize.Small, 4_000, false)]
[InlineData(RequestSize.Medium, 9999, true)]
[InlineData(RequestSize.Medium, 100_000, false)]
[InlineData(RequestSize.Medium, 10_000, false)]
[InlineData(RequestSize.Always, int.MaxValue, true)] // 2 GB event? No problem...
public void ExtractPayload_RequestSizeSmall_ContentLength(RequestSize requestSize, int contentLength, bool readBody)
{
Expand Down
Loading