[otel-agent] Use zstd compression for all signals #52758
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.43) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 395 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.358
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #52758"
general
weight: 0.35
truthbk
What does this PR do?
Makes the DDOT collector (
otel-agent) compress every signal withzstd, replacing the previous per-signal mix (zlib for metrics, gzip for traces, zstd for logs):metricscompression/fx) instead of the hardcoded zlib module; defaults to zstd level 3, overridable viaserializer_zstd_compressor_level.logs_config.zstd_compression_levelto 3 (overridable).fx-zstdmodule (zstd atBestSpeed); the trace level is intentionally fixed.Also adds tests that guard against future per-signal compression divergence.
Motivation
The DDOT exporter used a different compression algorithm per signal, which is inconsistent and harder to reason about. Standardizing on
zstdgives a consistent algorithm across metrics/traces/logs and a better compression ratio, with the level configurable per signal.Describe how you validated your changes
dda inv otel-agent.buildpasses;dda inv linter.go→ 0 issues on changed packages;gofmtclean.cmd/otel-agent/config): asserts metrics and logs resolve to the same algorithm (zstd) at level 3, that the level stays env-overridable, and that host metadata uses that same serializer compressor (so it is zstd too).comp/otelcol/otlp/integrationtest): now decodes trace payloads as zstd — verifies traces ship valid zstd end-to-end. Passes locally (dda inv otel-agent.integration-test).TestOTelAgentComplete/TestOTLPCompression): asserts metrics, traces, and logs reach fakeintake withContent-Encoding: zstd(requires the e2e infra to run).Additional Notes
otel-agent. The core Agent, trace-agent, host-profiler, and OSS exporter are unaffected — they use their own compression modules (metricscompression/fx,fx-zstd,fx-gzip,fx-otelrespectively).use_v3_api.series.enabledstaysfalse); moving series to v3 is a separate effort. ⚠️ Reviewers: please confirm the v2 series intake (/api/v2/series) acceptsContent-Encoding: zstd— the core Agent uses zstd→v3 for series by default, so this exact combination isn't exercised today. The new e2e test validates it against fakeintake.pkg/trace/writer/stats.go, shared with the trace-agent; out of scope here, separate conversation). The orchestrator/K8s-objects sub-exporter already uses zstd and is disabled by default. Internal exporter telemetry (metricsclient, COAT/gateway gauges) is scraped Prometheus/OTel-meter telemetry, not an intake submission.🤖 Generated with Claude Code