Repository navigation
Conversation
The SDK now gzip-compresses analytics event payloads unless enable_event_compression is set to False, on both Config and AsyncConfig. Compression reduces the bandwidth that event delivery uses. Relay Proxy versions before 8.9 cannot accept compressed events. If you send events through such a Relay Proxy, set enable_event_compression=False.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enable_event_compressionnow defaults toTruein bothConfigandAsyncConfig, so the SDK gzip-compresses event payloads unless you opt out.Relay Proxy versions before 8.9 cannot accept compressed events. If you send events through one, set
enable_event_compression=False. Relay Proxy users on newer versions may also want to disable it to avoid the decompress/recompress overhead. The parameter docstrings say this.This matches the Rust server SDK, which made the same change in v3.
Note
Overview
Breaking change:
enable_event_compressionnow defaults toTrueon bothConfigandAsyncConfig, so new clients gzip-compress analytics event bulk POSTs unless explicitly disabled. Event processors already honor the flag; this PR only flips the default and expands the parameter docs (Relay Proxy < 8.9 must setenable_event_compression=False; newer Relay Proxy users may disable to skip decompress/recompress CPU).Test helpers were updated so the suite keeps working with compressed bodies by default:
decode_request_body, auto-decompression onMockHttp.request_data/MockAioHttp.request_data, a newraw_request_datafor assertions on the wire bytes, and gzip handling in the integrationMockServerRequest. Added config default/opt-out tests and sync/async processor tests for compressed-by-default and uncompressed-when-disabled behavior.Reviewed by Cursor Bugbot for commit b0501f0. Bugbot is set up for automated code reviews on this repo. Configure here.