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 @@ -10,6 +10,7 @@
### Fixes

- The HTTP instrumentation uses the span created for the outgoing request in the sentry-trace header, fixing the parent-child relationship between client and server ([#4264](https://github.com/getsentry/sentry-dotnet/pull/4264))
- InvalidOperationException sending attachments on Android with LLVM enabled ([#4276](https://github.com/getsentry/sentry-dotnet/pull/4276))

### Dependencies

Expand Down
3 changes: 2 additions & 1 deletion src/Sentry/Internal/PartialStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public override async Task<int> ReadAsync(byte[] buffer, int offset, int count,
_innerStream.Position = innerPosition;
}

var read = await _innerStream.ReadAsync(buffer, offset, actualCount, cancellationToken)
// See https://github.com/getsentry/sentry-dotnet/issues/3101
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off, some .NET bug? how can we avoid this from happening again?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have treat-warning-as-error on?

Copy link
Member

@Flash0ver Flash0ver Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we only have the Default ruleset enabled, depending on the .NET SDK version.
We could enable All rules, and also lock/pin to a specific .NET SDK ruleset for deterministic builds.

Opened new issue as follow-up for more code analysis rules and diagnostics: #4287

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have treat-warning-as-error on?

We do but the analyzers for this error only appear to trigger in the .NET 10 SDK (we weren't getting any errors before that).

var read = await _innerStream.ReadAsync(buffer.AsMemory(offset, actualCount), cancellationToken)
.ConfigureAwait(false);

if (_length != null)
Expand Down
Loading