From 8bbbadc2372a96aa288b31f9a51adea72005afb0 Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Tue, 16 Apr 2024 10:31:33 +0200 Subject: [PATCH] feat: Enable log volume endpoint by default --- docs/sources/shared/configuration.md | 3 ++- pkg/validation/limits.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sources/shared/configuration.md b/docs/sources/shared/configuration.md index faa53b39d140e..6c43486f67c19 100644 --- a/docs/sources/shared/configuration.md +++ b/docs/sources/shared/configuration.md @@ -3148,7 +3148,8 @@ The `limits_config` block configures global and per-tenant limits in Loki. The v [max_querier_bytes_read: | default = 150GB] # Enable log-volume endpoints. -[volume_enabled: ] +# CLI flag: -limits.volume-enabled +[volume_enabled: | default = true] # The maximum number of aggregated series in a log-volume response # CLI flag: -limits.volume-max-series diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 9e2e3a6042c83..1b82716ce732c 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -385,6 +385,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { _ = l.MaxStructuredMetadataSize.Set(defaultMaxStructuredMetadataSize) f.Var(&l.MaxStructuredMetadataSize, "limits.max-structured-metadata-size", "Maximum size accepted for structured metadata per entry. Default: 64 kb. Any log line exceeding this limit will be discarded. There is no limit when unset or set to 0.") f.IntVar(&l.MaxStructuredMetadataEntriesCount, "limits.max-structured-metadata-entries-count", defaultMaxStructuredMetadataCount, "Maximum number of structured metadata entries per log line. Default: 128. Any log line exceeding this limit will be discarded. There is no limit when unset or set to 0.") + f.BoolVar(&l.VolumeEnabled, "limits.volume-enabled", true, "Enable log volume endpoint.") } // SetGlobalOTLPConfig set GlobalOTLPConfig which is used while unmarshaling per-tenant otlp config to use the default list of resource attributes picked as index labels.