Skip to content

fix(profiler): support gzip compression mode [#4696 backport]#4710

Merged
nsrip-dd merged 1 commit into
release-v2.7.xfrom
nick.ripley/4696-2.7-backport
May 1, 2026
Merged

fix(profiler): support gzip compression mode [#4696 backport]#4710
nsrip-dd merged 1 commit into
release-v2.7.xfrom
nick.ripley/4696-2.7-backport

Conversation

@nsrip-dd

Copy link
Copy Markdown
Contributor

Backport #4696 to the v2.7.x release branch

Adds a functional gzip compression mode for the profiler via
DD_PROFILING_DEBUG_COMPRESSION_SETTINGS=gzip. This was already kinda
working, but not really, hence the "fix" title.

  • Defaults gzip to gzip-6, matching the gzip level legacy mode applies
    when it compresses profiler-produced profiles.
  • Adds gzip-to-gzip recompression so gzip mode works for runtime
    profiles that are already gzip-compressed at gzip-1.
  • Adds tests for gzip mode and gzip recompression.

This is done for incident-53386, where zstd caused a memory usage
increase. The gzip mode provides an alternative to the default zstd
compression while keeping profiler uploads compressed.

Backport #4696 to the v2.7.x release branch

Adds a functional gzip compression mode for the profiler via
`DD_PROFILING_DEBUG_COMPRESSION_SETTINGS=gzip`. This was already kinda
working, but not really, hence the "fix" title.

- Defaults `gzip` to gzip-6, matching the gzip level legacy mode applies
  when it compresses profiler-produced profiles.
- Adds gzip-to-gzip recompression so gzip mode works for runtime
  profiles that are already gzip-compressed at gzip-1.
- Adds tests for gzip mode and gzip recompression.

This is done for incident-53386, where zstd caused a memory usage
increase. The gzip mode provides an alternative to the default zstd
compression while keeping profiler uploads compressed.
@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.84848% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.56%. Comparing base (dc57de6) to head (ce45805).
⚠️ Report is 1 commits behind head on release-v2.7.x.

Files with missing lines Patch % Lines
profiler/compression.go 84.84% 3 Missing and 2 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
profiler/compression.go 85.29% <84.84%> (-1.38%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nsrip-dd
nsrip-dd marked this pull request as ready for review April 30, 2026 19:03
@nsrip-dd
nsrip-dd requested a review from a team as a code owner April 30, 2026 19:03
@pr-commenter

pr-commenter Bot commented Apr 30, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-04-30 20:01:22

Comparing candidate commit ce45805 in PR branch nick.ripley/4696-2.7-backport with baseline commit dc57de6 in branch release-v2.7.x.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 149 metrics, 9 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@nsrip-dd
nsrip-dd merged commit ab325a8 into release-v2.7.x May 1, 2026
91 of 181 checks passed
@nsrip-dd
nsrip-dd deleted the nick.ripley/4696-2.7-backport branch May 1, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants