Skip to content

Commit 1e588c9

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

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,13 @@ 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 corresponding to the default max line size in Loki.
1957+
If the buffer increases above this size, then the line will be sent to output immediately, and the rest
1958+
of the line discarded. To change this behaviour, set `limits_config.max_line_size` to a non-zero value
1959+
to apply a hard limit.
1960+
19541961
The configuration is inherited from [Prometheus' Docker service discovery](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#docker_sd_config).
19551962

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

0 commit comments

Comments
 (0)