getsentry / getsentry/sentry-javascript

Compress envelopes in server SDKs with `zstd`, falling back to `gzip`

Đang mở
#20,500 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Bun Cloudflare Workers Deno Improvement Node.js
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

`@sentry/node` / `@sentry/node-core` already gzip envelopes **>32 KB** ([`packages/node-core/src/transports/http.ts`]())

zstd is a better compression algorithm which is supported by Relay and is available on all major runtimes today, but support is relatively new:

| Runtime | Version | Release date | Evidence |
| -- | -- | -- | -- |
| | \**Node.js* | | v22.15.0 (LTS) / v23.8. | | \~Jan 202 | | \[[nodejs.org/api/zlib.html]()\]([https://nodejs.org/api/zlib.html#class-zlibzstdcompress]() |
| | \**Bun* | | v1.2.1 | | \~May 202 | | [oven-sh/bun#23095](), \[getsentry/sentry-javascript#20313\]([https://github.com/oven-sh/bun/pull/20313]() |
| | \**Deno* | | v2.6.9 / v2.7. | | Feb 10 / Feb 25, 202 | | \[[denoland/deno#32025]()\]([https://github.com/denoland/deno/pull/32025]() |
| | \**Cloudflare Workers* | | workerd merge Feb 19, 202 | | \~Feb–Mar 2026 rollout (requires `nodejs_compat` flag | | \[[cloudflare/workerd#6117]()\]([https://github.com/cloudflare/workerd/pull/6117]() |

The API offers better compression ratios which can be used on smaller than 32kb payloads we have today and offer better gains and less load to our users and our servers.

API is mainly available through `node:zlib`'s `createZstdCompress` function. Worth noting that it is marked as experimental and on the time of writing this issue can be too new.

Seems its going to be used by our CLI [https://github.com/getsentry/cli/pull/843]()

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.