stats: add optional gzip compression to OTLP/HTTP stats sink#46246
Open
prashanthjos wants to merge 1 commit into
Open
stats: add optional gzip compression to OTLP/HTTP stats sink#46246prashanthjos wants to merge 1 commit into
prashanthjos wants to merge 1 commit into
Conversation
Adds a field (NONE default, GZIP) to the OpenTelemetry sink that gzip-compresses the OTLP/HTTP export body and sets (~14x smaller payloads). Defaults to NONE for backward compatibility; HTTP path only. Includes unit tests for both paths. Signed-off-by: Prashanth Josyula <prashanth.16@gmail.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
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.
Adds a field (NONE default, GZIP) to the OpenTelemetry sink that gzip-compresses
the OTLP/HTTP export body and sets (~14x smaller payloads). Defaults to
NONE for backward compatibility; HTTP path only. Includes unit tests for both paths.
Commit Message: stats: add optional gzip compression to OTLP/HTTP stats sink
Additional Description: Adds a
compressionenum field (NONE default, GZIP) to the OpenTelemetry stat sink's SinkConfig. When set to GZIP on thehttp_service(OTLP/HTTP) export path, the serialized ExportMetricsServiceRequest payload is gzip-compressed andContent-Encoding: gzipis set on the outbound request, reducing export bandwidth (~14x smaller on a representative 500-metric batch: 98,178 -> 6,800 bytes). Reuses the existing gzip compressor extension rather than hand-rolling zlib. Only honored for the HTTP path; the gRPC path continues to configure compression via the GrpcService. The OTLP/HTTP collector must support gzip decoding, per the OTLP/HTTP specification.Risk Level: Low
Testing: Unit tests added covering the uncompressed path (no Content-Encoding, raw body) and the gzip path (Content-Encoding: gzip, gzip magic bytes, round-trip decompresses to the original proto). Existing sink tests pass.
Docs Changes: Proto field documentation (SinkConfig.compression + Compression enum).
Release Notes: Added a changelog fragment under changelogs/current/new_features/.
Platform Specific Features: None
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]