chore: clean up pattern persistence configs (#18017)

pull/18020/head
Trevor Whitney 7 months ago committed by GitHub
parent 7d8293e935
commit 888e4012bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      docs/sources/shared/configuration.md
  2. 7
      pkg/pattern/pattern_config.go
  3. 9
      pkg/validation/limits.go

@ -662,10 +662,6 @@ pattern_ingester:
# Configures how detected patterns are pushed back to Loki for persistence.
pattern_persistence:
# Whether pattern persistence is enabled.
# CLI flag: -pattern-ingester.pattern-persistence.enabled
[enabled: <boolean> | default = false]
# The address of the Loki instance to push patterns to.
# CLI flag: -pattern-ingester.pattern-persistence.loki-address
[loki_address: <string> | default = ""]
@ -4346,13 +4342,16 @@ otlp_config:
# List of LogQL vector and range aggregations that should be sharded.
[shard_aggregations: <list of strings>]
# Enable metric and pattern aggregation. When enabled, pushed streams will be
# sampled for bytes, line count, and patterns. These metrics will be written
# back into Loki as a special __aggregated_metric__ stream.
# Enable metric aggregation. When enabled, pushed streams will be sampled for
# bytes and line counts. These metrics will be written back into Loki as a
# special __aggregated_metric__ stream.
# CLI flag: -limits.aggregation-enabled
[metric_aggregation_enabled: <boolean> | default = false]
[pattern_persistence_enabled: <boolean>]
# Enable persistence of patterns detected at ingest. When enabled, patterns for
# pushed streams will be written back into Loki as a special __pattern__ stream.
# CLI flag: -limits.pattern-persistence-enabled
[pattern_persistence_enabled: <boolean> | default = false]
# S3 server-side encryption type. Required to enable server-side encryption
# overrides for a specific tenant. If not set, the default S3 client settings

@ -10,7 +10,6 @@ import (
// PersistenceConfig contains the configuration for pushing detected patterns back to Loki
type PersistenceConfig struct {
Enabled bool `yaml:"enabled,omitempty" doc:"description=Whether pattern persistence is enabled."`
LokiAddr string `yaml:"loki_address,omitempty" doc:"description=The address of the Loki instance to push patterns to."`
WriteTimeout time.Duration `yaml:"timeout,omitempty" doc:"description=The timeout for writing patterns to Loki."`
PushPeriod time.Duration `yaml:"push_period,omitempty" doc:"description=How long to wait between pattern pushes to Loki."`
@ -27,12 +26,6 @@ func (cfg *PersistenceConfig) RegisterFlags(fs *flag.FlagSet) {
}
func (cfg *PersistenceConfig) RegisterFlagsWithPrefix(fs *flag.FlagSet, prefix string) {
fs.BoolVar(
&cfg.Enabled,
prefix+"enabled",
false,
"Enable pushing detected patterns back to Loki for persistence.",
)
fs.StringVar(
&cfg.LokiAddr,
prefix+"loki-address",

@ -468,8 +468,15 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) {
&l.MetricAggregationEnabled,
"limits.aggregation-enabled",
false,
"Enable metric and pattern aggregation. When enabled, pushed streams will be sampled for bytes, line count, and patterns. These metrics will be written back into Loki as a special __aggregated_metric__ stream.",
"Enable metric aggregation. When enabled, pushed streams will be sampled for bytes and line counts. These metrics will be written back into Loki as a special __aggregated_metric__ stream.",
)
f.BoolVar(
&l.PatternPersistenceEnabled,
"limits.pattern-persistence-enabled",
false,
"Enable persistence of patterns detected at ingest. When enabled, patterns for pushed streams will be written back into Loki as a special __pattern__ stream.",
)
f.DurationVar(&l.SimulatedPushLatency, "limits.simulated-push-latency", 0, "Simulated latency to add to push requests. This is used to test the performance of the write path under different latency conditions.")
f.BoolVar(

Loading…
Cancel
Save