Compress envelopes with Zstandard on .NET 11
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- csharp
- Domain
- backend, performance
Research direction
Start with GzipRequestBodyHandler, GzipBufferedRequestBodyHandler, DefaultSentryHttpClientFactory, and the RequestBodyCompressionLevel option; inspect how options are bound through BindableSentryOptions. Then review the .NET 11 compression APIs and the issue’s open questions about opt-in selection, older target frameworks, and mobile performance. Done means choosing and implementing the option and target framework behavior, with measurements informing any default.
Written by the indexing model from the issue text.
Description
On net11.0, envelopes could be compressed with Zstandard instead of gzip. Smaller envelopes matter most on Android and iOS, which also target net11.0 on version7.
Current state
We compress request bodies by hand with GZipStream, in GzipRequestBodyHandler and GzipBufferedRequestBodyHandler. DefaultSentryHttpClientFactory picks one when RequestBodyCompressionLevel isn't NoCompression.
What .NET 11 adds
System.Net.Http now has GZipCompressedContent, BrotliCompressedContent and ZstandardCompressedContent. They set Content-Encoding and compress the content as the request is written. ZstandardStream and ZstandardEncoder live in System.IO.Compression. All five are in the 11.0.0 GA reference pack.
See What's new in the .NET 11 libraries.
Server support
Relay has accepted Content-Encoding: zstd since getsentry/relay#4089. However, Relay rejects encodings it doesn't recognise, so a self-hosted Sentry running an older Relay would drop zstd envelopes. Zstd should therefore be opt-in, not the new default.
Open questions
- How should users choose the algorithm? One option is a new option next to
RequestBodyCompressionLevel, which also needs a matchingBindableSentryOptionsproperty. - Should the
net11.0gzip path also move toGZipCompressedContent? The existing handlers have to stay for older TFMs either way, so this adds a#if NET11_0_OR_GREATERpath rather than removing code. - How much smaller are typical envelopes with zstd than with gzip, and what does it cost in CPU on mobile? Measure before choosing defaults.
- Dominant language
- C#
- Stars
- 775
- Forks
- 262
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 118
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Possibly taken @pcbeingused33 claimed this today. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6039 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET Platform: Android Task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-dotnet#6020 · 3 comments ·
Maintainers usually reply within 1 day
-
Move the Blazor WebAssembly sample off the deprecated DevServerPossibly taken A pull request linked to this issue is open or already merged. Open.NET Framework: Blazor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
getsentry/sentry-dotnet#5906 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs MSBuild Needs Docs Update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-dotnet#5691 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-dotnet
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day