Skip to content

Commit

Permalink
Remove deprecated ruler_remote_write_queue_batch_send_deadline and ru…
Browse files Browse the repository at this point in the history
…ler_remote_write_queue_max_samples_per_send
  • Loading branch information
shantanualsi committed Nov 8, 2023
1 parent e179564 commit 06e5144
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 49 deletions.
8 changes: 0 additions & 8 deletions docs/sources/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <int>]

# Deprecated: Use 'ruler_remote_write_config' instead. Maximum number of samples
# per send.
[ruler_remote_write_queue_max_samples_per_send: <int>]

# Deprecated: Use 'ruler_remote_write_config' instead. Maximum time a sample
# will wait in buffer.
[ruler_remote_write_queue_batch_send_deadline: <duration>]

# 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:
Expand Down
2 changes: 0 additions & 2 deletions docs/sources/operations/overrides-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 0 additions & 2 deletions pkg/ruler/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions pkg/ruler/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
16 changes: 0 additions & 16 deletions pkg/validation/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."`
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions tools/deprecated-config-checker/checker/checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions tools/deprecated-config-checker/deprecated-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions tools/deprecated-config-checker/test-fixtures/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06e5144

Please sign in to comment.