Skip to content

Commit 0388230

Browse files
Merge pull request #65036 from andreasgerstmayr/distr-tracing-otel-memory-limiter
2 parents a52e926 + 8e2dd94 commit 0388230

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

modules/distr-tracing-otel-config-collector.adoc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,60 @@ The batch processor batches the data to reduce the number of outgoing connection
296296
| 1000
297297
|===
298298

299+
[id="memorylimiter-processor_{context}"]
300+
==== Memory Limiter processor
301+
302+
The Memory Limiter processor periodically checks the Collector's memory usage and pauses data processing when the soft memory limit is reached.
303+
The preceding component, which is typically a receiver, is expected to retry sending the same data and may apply a backpressure to the incoming data.
304+
When memory usage exceeds the hard limit, the Memory Limiter processor forces garbage collection to run.
305+
306+
* Support level: General Availability
307+
* Supported signals: traces, metrics, logs
308+
309+
.Example of the OpenTelemetry Collector custom resource when using the Memory Limiter processor
310+
[source,yaml]
311+
----
312+
config: |
313+
processor:
314+
memory_limiter:
315+
check_interval: 1s
316+
limit_mib: 4000
317+
spike_limit_mib: 800
318+
service:
319+
pipelines:
320+
traces:
321+
processors: [batch]
322+
metrics:
323+
processors: [batch]
324+
----
325+
326+
.Parameters used by the Memory Limiter processor
327+
[cols="3",options="header"]
328+
|===
329+
| Parameter | Description | Default
330+
331+
| `check_interval`
332+
| Time between memory usage measurements. The optimal value is 1s. For spiky traffic patterns, you can decrease the `check_interval` or increase the `spike_limit_mib`.
333+
| `0s`
334+
335+
| `limit_mib`
336+
| The hard limit, which is the maximum amount of memory in MiB allocated on the heap. Typically, the total memory usage of the OpenTelemetry Collector is about 50 MiB greater than this value.
337+
| `0`
338+
339+
| `spike_limit_mib`
340+
| Spike limit, which is the maximum expected spike of memory usage in MiB. The optimal value is approximately 20% of `limit_mib`. To calculate the soft limit, subtract the `spike_limit_mib` from the `limit_mib`.
341+
| 20% of `limit_mib`
342+
343+
| `limit_percentage`
344+
| Same as the `limit_mib` but expressed as a percentage of the total available memory. The `limit_mib` setting takes precedence over this setting.
345+
| `0`
346+
347+
| `spike_limit_percentage`
348+
| Same as the `spike_limit_mib` but expressed as a percentage of the total available memory. Intended to be used with the `limit_percentage` setting.
349+
| `0`
350+
351+
|===
352+
299353
[id="resource-detection-processor_{context}"]
300354
==== Resource Detection processor
301355

0 commit comments

Comments
 (0)