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

dont log Ignoring request with Size null #1348

Merged
merged 6 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -4,6 +4,7 @@

### Features

- Dont log "Ignoring request with Size" when null ([#1348](https://github.com/getsentry/sentry-unity/pull/1348))
SimonCropp marked this conversation as resolved.
Show resolved Hide resolved
- Move to stable v6 for `Microsoft.Extensions.*` packages ([#1347](https://github.com/getsentry/sentry-dotnet/pull/1347))

## 3.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public ProtobufRequestExtractionDispatcher(IEnumerable<IProtobufRequestPayloadEx
return null;
}

_options.Log(SentryLevel.Warning,
"Ignoring request with Size {0} and configuration RequestSize {1}", null, request.ContentLength, size);

return null;
}
}
7 changes: 5 additions & 2 deletions src/Sentry/Extensibility/RequestBodyExtractionDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ public RequestBodyExtractionDispatcher(IEnumerable<IRequestPayloadExtractor> ext
return null;
}

_options.LogWarning("Ignoring request with Size {0} and configuration RequestSize {1}",
request.ContentLength, size);
if (request.ContentLength is not null)
{
_options.LogWarning("Ignoring request with Size {0} and configuration RequestSize {1}",
request.ContentLength, size);
}

return null;
}
Expand Down