Skip to content

Commit f38eff5

Browse files
committed
Update documentation on max_line_size
1 parent aa55d88 commit f38eff5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/sources/send-data/promtail/configuration.md

+8
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,12 @@ or [journald](https://docs.docker.com/config/containers/logging/journald/) loggi
19511951
Note that the discovery will not pick up finished containers. That means
19521952
Promtail will not scrape the remaining logs from finished containers after a restart.
19531953

1954+
The Docker target correctly joins log segments if a long line was split into different frames by Docker.
1955+
To avoid hypothetically unlimited line size and out-of-memory errors in Promtail, this target applies
1956+
a default soft line size limit of 256 kiB. If the buffer increases above this size, then the line will
1957+
be sent to output immediately, and the rest of the line discarded. To change this behaviour, set
1958+
`limits_config.max_line_size` to a non-zero value to apply a hard limit.
1959+
19541960
The configuration is inherited from [Prometheus' Docker service discovery](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#docker_sd_config).
19551961

19561962
```yaml
@@ -2076,6 +2082,8 @@ The optional `limits_config` block configures global limits for this instance of
20762082
[max_streams: <int> | default = 0]
20772083
20782084
# Maximum log line byte size allowed without dropping. Example: 256kb, 2M. 0 to disable.
2085+
# If disabled, targets may apply default buffer size safety limits. If a target implements
2086+
# a default limit, this will be documented under the `scrape_configs` entry.
20792087
[max_line_size: <int> | default = 0]
20802088
# Whether to truncate lines that exceed max_line_size. No effect if max_line_size is disabled
20812089
[max_line_size_truncate: <bool> | default = false]

0 commit comments

Comments
 (0)