Default NAP security-violation logs to be gzipped individually via custom processor #1092
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.
Proposed changes
We added a custom log processor
logsgzip
, that performs gzip compression on each log processed by the OpenTelemetry collector log pipeline in Agent V3. This processor is plugged to the pipeline before thebatch
processor.Purpose: It compresses individual log records into gzip format to reduce their size, which improves performance when processing large log volumes.
Execution:
Performance optimization: The processor uses a sync.Pool to efficiently reuse gzip.Writer instances, reducing memory allocations and garbage collection overhead during high-throughput processing.
Error handling: It collects and aggregates errors that occur during processing but continues to process as many logs as possible.
Benchmarking: We performed benchmarks of this processor with and without a
sync.Pool
for efficient utilization of gzip writer. Results have been summarized in the README.md.Updated OTLP Logs Pipeline Structure (from processors section)
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)