diff --git a/docs/sources/configure/_index.md b/docs/sources/configure/_index.md index 4c6b5ddc738a8..23c11f58c0bbd 100644 --- a/docs/sources/configure/_index.md +++ b/docs/sources/configure/_index.md @@ -2799,14 +2799,6 @@ The `limits_config` block configures global and per-tenant limits in Loki. # to keep throughput up while processing occasional slow remote requests. [ruler_remote_write_queue_capacity: ] -# Deprecated: Use 'ruler_remote_write_config' instead. Maximum number of samples -# per send. -[ruler_remote_write_queue_max_samples_per_send: ] - -# Deprecated: Use 'ruler_remote_write_config' instead. Maximum time a sample -# will wait in buffer. -[ruler_remote_write_queue_batch_send_deadline: ] - # Deprecated: Use 'ruler_remote_write_config' instead. Configures AWS's # Signature Verification 4 signing process to sign every remote write request. ruler_remote_write_sigv4_config: diff --git a/docs/sources/operations/overrides-exporter.md b/docs/sources/operations/overrides-exporter.md index 225b113ece8ab..505d5dfd5f2a0 100644 --- a/docs/sources/operations/overrides-exporter.md +++ b/docs/sources/operations/overrides-exporter.md @@ -73,9 +73,7 @@ loki_overrides_defaults{limit_name="retention_period"} 2.6784e+15 loki_overrides_defaults{limit_name="ruler_evaluation_delay_duration"} 0 loki_overrides_defaults{limit_name="ruler_max_rule_groups_per_tenant"} 0 loki_overrides_defaults{limit_name="ruler_max_rules_per_rule_group"} 0 -loki_overrides_defaults{limit_name="ruler_remote_write_queue_batch_send_deadline"} 0 loki_overrides_defaults{limit_name="ruler_remote_write_queue_capacity"} 0 -loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_samples_per_send"} 0 loki_overrides_defaults{limit_name="split_queries_by_interval"} 0 ``` diff --git a/pkg/ruler/compat.go b/pkg/ruler/compat.go index 83ca2edb0ff91..1f377d64a068d 100644 --- a/pkg/ruler/compat.go +++ b/pkg/ruler/compat.go @@ -41,8 +41,6 @@ type RulesLimits interface { RulerRemoteWriteRelabelConfigs(userID string) []*util.RelabelConfig RulerRemoteWriteConfig(userID string, id string) *config.RemoteWriteConfig RulerRemoteWriteQueueCapacity(userID string) int - RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int - RulerRemoteWriteQueueBatchSendDeadline(userID string) time.Duration RulerRemoteWriteSigV4Config(userID string) *sigv4.SigV4Config RulerRemoteEvaluationTimeout(userID string) time.Duration diff --git a/pkg/ruler/registry.go b/pkg/ruler/registry.go index 8c19c2d10ba1a..7062f6bf4d2fb 100644 --- a/pkg/ruler/registry.go +++ b/pkg/ruler/registry.go @@ -12,7 +12,6 @@ import ( "github.com/imdario/mergo" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" @@ -258,14 +257,6 @@ func (r *walRegistry) getTenantRemoteWriteConfig(tenant string, base RemoteWrite clt.QueueConfig.Capacity = v } - if v := r.overrides.RulerRemoteWriteQueueMaxSamplesPerSend(tenant); v > 0 { - clt.QueueConfig.MaxSamplesPerSend = v - } - - if v := r.overrides.RulerRemoteWriteQueueBatchSendDeadline(tenant); v > 0 { - clt.QueueConfig.BatchSendDeadline = model.Duration(v) - } - if v := r.overrides.RulerRemoteWriteSigV4Config(tenant); v != nil { clt.SigV4Config = v } diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index afe9a1b3c4215..d8350c16b1b52 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -134,10 +134,6 @@ type Limits struct { // deprecated use RulerRemoteWriteConfig instead RulerRemoteWriteQueueCapacity int `yaml:"ruler_remote_write_queue_capacity" json:"ruler_remote_write_queue_capacity" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Number of samples to buffer per shard before we block reading of more samples from the WAL. It is recommended to have enough capacity in each shard to buffer several requests to keep throughput up while processing occasional slow remote requests."` // deprecated use RulerRemoteWriteConfig instead - RulerRemoteWriteQueueMaxSamplesPerSend int `yaml:"ruler_remote_write_queue_max_samples_per_send" json:"ruler_remote_write_queue_max_samples_per_send" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum number of samples per send."` - // deprecated use RulerRemoteWriteConfig instead - RulerRemoteWriteQueueBatchSendDeadline time.Duration `yaml:"ruler_remote_write_queue_batch_send_deadline" json:"ruler_remote_write_queue_batch_send_deadline" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum time a sample will wait in buffer."` - // deprecated use RulerRemoteWriteConfig instead RulerRemoteWriteSigV4Config *sigv4.SigV4Config `yaml:"ruler_remote_write_sigv4_config" json:"ruler_remote_write_sigv4_config" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Configures AWS's Signature Verification 4 signing process to sign every remote write request."` RulerRemoteWriteConfig map[string]config.RemoteWriteConfig `yaml:"ruler_remote_write_config,omitempty" json:"ruler_remote_write_config,omitempty" doc:"description=Configures global and per-tenant limits for remote write clients. A map with remote client id as key."` @@ -621,18 +617,6 @@ func (o *Overrides) RulerRemoteWriteQueueCapacity(userID string) int { return o.getOverridesForUser(userID).RulerRemoteWriteQueueCapacity } -// Deprecated: use RulerRemoteWriteConfig instead -// RulerRemoteWriteQueueMaxSamplesPerSend returns the max samples to send in a remote-write for a given user. -func (o *Overrides) RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int { - return o.getOverridesForUser(userID).RulerRemoteWriteQueueMaxSamplesPerSend -} - -// Deprecated: use RulerRemoteWriteConfig instead -// RulerRemoteWriteQueueBatchSendDeadline returns the maximum time a sample will be buffered before being discarded for a given user. -func (o *Overrides) RulerRemoteWriteQueueBatchSendDeadline(userID string) time.Duration { - return o.getOverridesForUser(userID).RulerRemoteWriteQueueBatchSendDeadline -} - // Deprecated: use RulerRemoteWriteConfig instead func (o *Overrides) RulerRemoteWriteSigV4Config(userID string) *sigv4.SigV4Config { return o.getOverridesForUser(userID).RulerRemoteWriteSigV4Config diff --git a/tools/deprecated-config-checker/checker/checker_test.go b/tools/deprecated-config-checker/checker/checker_test.go index f7f5993b182cb..74762db30a747 100644 --- a/tools/deprecated-config-checker/checker/checker_test.go +++ b/tools/deprecated-config-checker/checker/checker_test.go @@ -50,8 +50,6 @@ var ( "limits_config.ruler_remote_write_headers", "limits_config.ruler_remote_write_relabel_configs", "limits_config.ruler_remote_write_queue_capacity", - "limits_config.ruler_remote_write_queue_max_samples_per_send", - "limits_config.ruler_remote_write_queue_batch_send_deadline", "limits_config.ruler_remote_write_sigv4_config", "limits_config.per_tenant_override_config", "limits_config.per_tenant_override_period", @@ -82,8 +80,6 @@ var ( "overrides.foo.ruler_remote_write_headers", "overrides.foo.ruler_remote_write_relabel_configs", "overrides.foo.ruler_remote_write_queue_capacity", - "overrides.foo.ruler_remote_write_queue_max_samples_per_send", - "overrides.foo.ruler_remote_write_queue_batch_send_deadline", "overrides.foo.ruler_remote_write_sigv4_config", "overrides.foo.per_tenant_override_config", "overrides.foo.per_tenant_override_period", @@ -93,8 +89,6 @@ var ( "overrides.bar.ruler_remote_write_headers", "overrides.bar.ruler_remote_write_relabel_configs", "overrides.bar.ruler_remote_write_queue_capacity", - "overrides.bar.ruler_remote_write_queue_max_samples_per_send", - "overrides.bar.ruler_remote_write_queue_batch_send_deadline", "overrides.bar.ruler_remote_write_sigv4_config", "overrides.bar.per_tenant_override_config", "overrides.bar.per_tenant_override_period", diff --git a/tools/deprecated-config-checker/deprecated-config.yaml b/tools/deprecated-config-checker/deprecated-config.yaml index 971e15ecb934e..cd8096386f97a 100644 --- a/tools/deprecated-config-checker/deprecated-config.yaml +++ b/tools/deprecated-config-checker/deprecated-config.yaml @@ -52,8 +52,6 @@ limits_config: ruler_remote_write_headers: "Use ruler_remote_write_config instead." ruler_remote_write_relabel_configs: "Use ruler_remote_write_config instead." ruler_remote_write_queue_capacity: "Use ruler_remote_write_config instead." - ruler_remote_write_queue_max_samples_per_send: "Use ruler_remote_write_config instead." - ruler_remote_write_queue_batch_send_deadline: "Use ruler_remote_write_config instead." ruler_remote_write_sigv4_config: "Use ruler_remote_write_config instead." per_tenant_override_config: "Feature renamed to 'runtime configuration', flag deprecated in favor of runtime_config.file" per_tenant_override_period: "Feature renamed to 'runtime configuration', flag deprecated in favor of runtime_config.period" diff --git a/tools/deprecated-config-checker/test-fixtures/config.yaml b/tools/deprecated-config-checker/test-fixtures/config.yaml index 39cc0928bae1c..eefe70c114ac8 100644 --- a/tools/deprecated-config-checker/test-fixtures/config.yaml +++ b/tools/deprecated-config-checker/test-fixtures/config.yaml @@ -121,8 +121,6 @@ limits_config: ruler_remote_write_headers: ["foo", "bar"] # DEPRECATED ruler_remote_write_relabel_configs: "foo" # DEPRECATED ruler_remote_write_queue_capacity: 10 # DEPRECATED - ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED - ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED ruler_remote_write_sigv4_config: # DEPRECATED region: "wherever" per_tenant_override_config: ./overrides.yaml # DEPRECATED diff --git a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml index 1436e415015b1..b699adc1a9aa2 100644 --- a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml +++ b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml @@ -6,8 +6,6 @@ overrides: ruler_remote_write_headers: [ "foo", "bar" ] # DEPRECATED ruler_remote_write_relabel_configs: "foo" # DEPRECATED ruler_remote_write_queue_capacity: 10 # DEPRECATED - ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED - ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED ruler_remote_write_sigv4_config: # DEPRECATED region: "wherever" per_tenant_override_config: ./overrides.yaml # DEPRECATED