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

fix: Choice of capture compression #1062

Merged
merged 1 commit into from
Mar 11, 2024
Merged

fix: Choice of capture compression #1062

merged 1 commit into from
Mar 11, 2024

Conversation

benjackwhite
Copy link
Collaborator

Changes

Some refactoring whilst improving the logic had one side effect - the compression is now a derived value but it is saved in the first event. This means that when the queue is filled, the compression from the first event is used instead of the last one.

To generally make this better I figured it makes sense to be explicit - have a "best-available" option which will select compression as the request is made based on what decide says (with base64 still as the default)

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label Mar 8, 2024
@benjackwhite benjackwhite requested a review from pauldambra March 8, 2024 17:19
Copy link

github-actions bot commented Mar 8, 2024

Size Change: +312 B (0%)

Total Size: 849 kB

Filename Size Change
dist/array.full.js 182 kB +78 B (0%)
dist/array.js 123 kB +78 B (0%)
dist/es.js 123 kB +78 B (0%)
dist/module.js 124 kB +78 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12.1 kB
dist/recorder-v2.js 106 kB
dist/recorder.js 58.7 kB
dist/surveys-module-previews.js 62.1 kB
dist/surveys.js 58.4 kB

compressed-size-action

@benjackwhite benjackwhite merged commit 68bcb1d into main Mar 11, 2024
14 checks passed
@benjackwhite benjackwhite deleted the fix/b64 branch March 11, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant