From 97835a0c986b28b98ef25c7abbafff9e07138cd2 Mon Sep 17 00:00:00 2001 From: Vitalii Parfonov Date: Fri, 16 May 2025 17:01:19 +0300 Subject: [PATCH] LOG-7131: update documentation Tuning Delivery mode default settings Signed-off-by: Vitalii Parfonov --- api/observability/v1/output_types.go | 3 + ...ity.openshift.io_clusterlogforwarders.yaml | 77 +++++++++++++------ ...ity.openshift.io_clusterlogforwarders.yaml | 77 +++++++++++++------ docs/features/collection.adoc | 4 +- 4 files changed, 116 insertions(+), 45 deletions(-) diff --git a/api/observability/v1/output_types.go b/api/observability/v1/output_types.go index 79c13ae849..06ef643f27 100644 --- a/api/observability/v1/output_types.go +++ b/api/observability/v1/output_types.go @@ -222,6 +222,9 @@ type BaseOutputTuningSpec struct { } // DeliveryMode sets the delivery mode for log forwarding. +// This optional setting. When it is left unset, the system defaults to using an in-memory buffer. +// In-memory buffers offer the highest performance due to low latency, but they have two limitations: +// they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. // // +kubebuilder:validation:Enum:=AtLeastOnce;AtMostOnce type DeliveryMode string diff --git a/bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml b/bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml index 568e68628d..f5fc065172 100644 --- a/bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml +++ b/bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml @@ -906,8 +906,11 @@ spec: description: Tuning specs tuning for the output properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1099,8 +1102,11 @@ spec: - zstd type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1248,8 +1254,11 @@ spec: - zlib type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1363,8 +1372,11 @@ spec: description: Tuning specs tuning for the output properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1511,8 +1523,11 @@ spec: - zlib type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1646,8 +1661,11 @@ spec: - lz4 type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1818,8 +1836,11 @@ spec: - snappy type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2042,8 +2063,11 @@ spec: - snappy type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2173,8 +2197,11 @@ spec: - none type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2290,8 +2317,11 @@ spec: - gzip type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2489,8 +2519,11 @@ spec: nullable: true properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce diff --git a/config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml b/config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml index 467e38233c..a7bc4e90ca 100644 --- a/config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml +++ b/config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml @@ -906,8 +906,11 @@ spec: description: Tuning specs tuning for the output properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1099,8 +1102,11 @@ spec: - zstd type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1248,8 +1254,11 @@ spec: - zlib type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1363,8 +1372,11 @@ spec: description: Tuning specs tuning for the output properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1511,8 +1523,11 @@ spec: - zlib type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1646,8 +1661,11 @@ spec: - lz4 type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -1818,8 +1836,11 @@ spec: - snappy type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2042,8 +2063,11 @@ spec: - snappy type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2173,8 +2197,11 @@ spec: - none type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2290,8 +2317,11 @@ spec: - gzip type: string deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce @@ -2489,8 +2519,11 @@ spec: nullable: true properties: deliveryMode: - description: DeliveryMode sets the delivery mode for - log forwarding. + description: |- + DeliveryMode sets the delivery mode for log forwarding. + This optional setting. When it is left unset, the system defaults to using an in-memory buffer. + In-memory buffers offer the highest performance due to low latency, but they have two limitations: + they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. enum: - AtLeastOnce - AtMostOnce diff --git a/docs/features/collection.adoc b/docs/features/collection.adoc index cd1e3c14e4..5eb777ff0e 100644 --- a/docs/features/collection.adoc +++ b/docs/features/collection.adoc @@ -106,10 +106,12 @@ Following is a list of output tuning options based upon the https://github.com/o |Delivery a|The mode for log forwarding. -- AtLeastOnce (default): The forwarder will block in an attempt to deliver all messages. When the tuning spec is added to an output, this additionally configures an internal, durable buffer so the collector can attempt to forward any logs read before it restarted +- AtLeastOnce: The forwarder will block in an attempt to deliver all messages. When the tuning spec is added to an output, this additionally configures an internal, durable buffer so the collector can attempt to forward any logs read before it restarted - AtMostOnce: The forwarder may provide better throughput but also may drop logs in the event of spikes in volume and backpressure from the output. Undelivered, collected logs will be lost on collector restart. **NOTE:**: Log collection and forwarding is best effort. *AtLeastOnce* delivery mode does not guarantee logs will not be lost. + +**NOTE:**: When this setting is left unset, the system defaults to using an in-memory buffer with a capacity of 500 events. In-memory buffers offer the highest performance due to low latency, but they have two limitations: they will consume memory, and they do not provide durability — buffered data is lost on process termination or failure. |Compression a| The compression algorithm to use to compress the data before sending over the network.