Skip to content

Commit

Permalink
Merge branch 'main' into charleskorn/mqe-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn authored Oct 14, 2024
2 parents 3a56b06 + ef3ece3 commit 925e240
Show file tree
Hide file tree
Showing 155 changed files with 5,969 additions and 1,338 deletions.
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* `cortex_alertmanager_state_replication_failed_total`
* `cortex_alertmanager_alerts`
* `cortex_alertmanager_silences`
* [CHANGE] Cache: Deprecate experimental support for Redis as a cache backend. #9453
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #9367 #9368 #9398 #9399 #9403 #9417 #9418 #9419 #9420 #9482 #9504 #9505 #9507 #9518 #9531 #9532 #9533 #9553 #9558
* [FEATURE] Query-frontend: added experimental configuration options `query-frontend.cache-errors` and `query-frontend.results-cache-ttl-for-errors` to allow non-transient responses to be cached. When set to `true` error responses from hitting limits or bad data are cached for a short TTL. #9028
* [FEATURE] gRPC: Support S2 compression. #9322
Expand All @@ -28,12 +27,21 @@
* [FEATURE] Alertmanager: limit added for maximum size of the Grafana state (`-alertmanager.max-grafana-state-size-bytes`). #9475
* [FEATURE] Alertmanager: limit added for maximum size of the Grafana configuration (`-alertmanager.max-config-size-bytes`). #9402
* [FEATURE] Ingester: Experimental support for ingesting out-of-order native histograms. This is disabled by default and can be enabled by setting `-ingester.ooo-native-histograms-ingestion-enabled` to `true`. #7175
* [FEATURE] Distributor: Added `-api.skip-label-count-validation-header-enabled` option to allow skipping label count validation on the HTTP write path based on `X-Mimir-SkipLabelCountValidation` header being `true` or not. #9576
* [ENHANCEMENT] mimirtool: Adds bearer token support for mimirtool's analyze ruler/prometheus commands. #9587
* [ENHANCEMENT] Ruler: Support `exclude_alerts` parameter in `<prometheus-http-prefix>/api/v1/rules` endpoint. #9300
* [ENHANCEMENT] Distributor: add a metric to track tenants who are sending newlines in their label values called `cortex_distributor_label_values_with_newlines_total`. #9400
* [ENHANCEMENT] Ingester: improve performance of reading the WAL. #9508
* [ENHANCEMENT] Query-scheduler: improve the errors and traces emitted by query-schedulers when communicating with queriers. #9519
* [ENHANCEMENT] Compactor: uploaded blocks cannot be bigger than max configured compactor time range, and cannot cross the boundary for given time range. #9524
* [ENHANCEMENT] The distributor now validates that received label values only contain allowed characters. #9185
* [ENHANCEMENT] Add SASL plain authentication support to Kafka client used by the experimental ingest storage. Configure SASL credentials via the following settings: #9584
* `-ingest-storage.kafka.sasl-password`
* `-ingest-storage.kafka.sasl-username`
* [ENHANCEMENT] memberlist: TCP transport write path is now non-blocking, and is configurable by new flags: #9594
* `-memberlist.max-concurrent-writes`
* `-memberlist.acquire-writer-timeout`
* [ENHANCEMENT] memberlist: Notifications can now be processed once per interval specified by `-memberlist.notify-interval` to reduce notify storm CPU activity in large clusters. #9594
* [BUGFIX] Fix issue where functions such as `rate()` over native histograms could return incorrect values if a float stale marker was present in the selected range. #9508
* [BUGFIX] Fix issue where negation of native histograms (eg. `-some_native_histogram_series`) did nothing. #9508
* [BUGFIX] Fix issue where `metric might not be a counter, name does not end in _total/_sum/_count/_bucket` annotation would be emitted even if `rate` or `increase` did not have enough samples to compute a result. #9508
Expand All @@ -46,25 +54,32 @@

### Jsonnet

* [FEATURE] Add support to deploy distributors in multi availability zones. #9548
* [ENHANCEMENT] Add `ingest_storage_ingester_autoscaling_triggers` option to specify multiple triggers in ScaledObject created for ingest-store ingester autoscaling. #9422
* [ENHANCEMENT] Add `ingest_storage_ingester_autoscaling_scale_up_stabilization_window_seconds` and `ingest_storage_ingester_autoscaling_scale_down_stabilization_window_seconds` config options to make stabilization window for ingester autoscaling when using ingest-storage configurable. #9445
* [ENHANCEMENT] Make label-selector in ReplicaTemplate/ingester-zone-a object configurable when using ingest-storage. #9480
* [ENHANCEMENT] Add `querier_only_args` option to specify CLI flags that apply only to queriers but not ruler-queriers. #9503
* [ENHANCEMENT] Validate the Kafka client ID configured when ingest storage is enabled. #9573

### Mimirtool

### Mimir Continuous Test

### Query-tee

* [FEATURE] Added `-proxy.compare-skip-samples-before` to skip samples before the given time when comparing responses. The time can be in RFC3339 format (or) RFC3339 without the timezone and seconds (or) date only. #9515

### Documentation

### Tools

* [FEATURE] `splitblocks`: add new tool to split blocks larger than a specified duration into multiple blocks. #9517
* [ENHANCEMENT] `copyblocks`: Added `--skip-no-compact-block-duration-check`, which defaults to `false`, to simplify targeting blocks that are not awaiting compaction. #9439
* [ENHANCEMENT] `kafkatool`: add SASL plain authentication support. The following new CLI flags have been added: #9584
* `--kafka-sasl-username`
* `--kafka-sasl-password`

## v2.14.0-rc.0
## 2.14.0

### Grafana Mimir

Expand Down Expand Up @@ -98,6 +113,7 @@
* [CHANGE] Distributor: reject incoming requests until the distributor service has started. #9317
* [CHANGE] Ingester, Distributor: Remove deprecated `-ingester.limit-inflight-requests-using-grpc-method-limiter` and `-distributor.limit-inflight-requests-using-grpc-method-limiter`. The feature was deprecated and enabled by default in Mimir 2.12. #9407
* [CHANGE] Querier: Remove deprecated `-querier.max-query-into-future`. The feature was deprecated in Mimir 2.12. #9407
* [CHANGE] Cache: Deprecate experimental support for Redis as a cache backend. The support is set to be removed in the next major release. #9453
* [FEATURE] Alertmanager: Added `-alertmanager.log-parsing-label-matchers` to control logging when parsing label matchers. This flag is intended to be used with `-alertmanager.utf8-strict-mode-enabled` to validate UTF-8 strict mode is working as intended. The default value is `false`. #9173
* [FEATURE] Alertmanager: Added `-alertmanager.utf8-migration-logging-enabled` to enable logging of tenant configurations that are incompatible with UTF-8 strict mode. The default value is `false`. #9174
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #8422 #8430 #8454 #8455 #8360 #8490 #8508 #8577 #8660 #8671 #8677 #8747 #8850 #8872 #8838 #8911 #8909 #8923 #8924 #8925 #8932 #8933 #8934 #8962 #8986 #8993 #8995 #9008 #9017 #9018 #9019 #9120 #9121 #9136 #9139 #9140 #9145 #9191 #9192 #9194 #9196 #9201 #9212 #9225 #9260 #9272 #9277 #9278 #9280 #9281 #9342 #9343 #9371
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.13.0
2.14.0
64 changes: 64 additions & 0 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "skip_label_count_validation_header_enabled",
"required": false,
"desc": "Allows to disable enforcement of the label count limit \"max_label_names_per_series\" via X-Mimir-SkipLabelCountValidation header on the http write path. Allowing this for external clients allows any client to send invalid label counts. After enabling it, requests with a specific HTTP header set to true will not have label counts validated.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "api.skip-label-count-validation-header-enabled",
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "get_request_for_ingester_shutdown_enabled",
Expand Down Expand Up @@ -6542,6 +6553,26 @@
"fieldFlag": "ingest-storage.kafka.write-clients",
"fieldType": "int"
},
{
"kind": "field",
"name": "sasl_username",
"required": false,
"desc": "The username used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "ingest-storage.kafka.sasl-username",
"fieldType": "string"
},
{
"kind": "field",
"name": "sasl_password",
"required": false,
"desc": "The password used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.",
"fieldValue": null,
"fieldDefaultValue": "",
"fieldFlag": "ingest-storage.kafka.sasl-password",
"fieldType": "string"
},
{
"kind": "field",
"name": "consumer_group",
Expand Down Expand Up @@ -16010,6 +16041,17 @@
"fieldType": "boolean",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "notify_interval",
"required": false,
"desc": "How frequently to notify watchers when a key changes. Can reduce CPU activity in large memberlist deployments. 0 to notify without delay.",
"fieldValue": null,
"fieldDefaultValue": 0,
"fieldFlag": "memberlist.notify-interval",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "advertise_addr",
Expand Down Expand Up @@ -16202,6 +16244,28 @@
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "max_concurrent_writes",
"required": false,
"desc": "Maximum number of concurrent writes to other nodes.",
"fieldValue": null,
"fieldDefaultValue": 3,
"fieldFlag": "memberlist.max-concurrent-writes",
"fieldType": "int",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "acquire_writer_timeout",
"required": false,
"desc": "Timeout for acquiring one of the concurrent write slots. After this time, the message will be dropped.",
"fieldValue": null,
"fieldDefaultValue": 250000000,
"fieldFlag": "memberlist.acquire-writer-timeout",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "tls_enabled",
Expand Down
12 changes: 12 additions & 0 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ Usage of ./cmd/mimir/mimir:
The URL under which Alertmanager is externally reachable (eg. could be different than -http.alertmanager-http-prefix in case Alertmanager is served via a reverse proxy). This setting is used both to configure the internal requests router and to generate links in alert templates. If the external URL has a path portion, it will be used to prefix all HTTP endpoints served by Alertmanager, both the UI and API. (default http://localhost:8080/alertmanager)
-api.get-request-for-ingester-shutdown-enabled
[deprecated] Enable GET requests to the /ingester/shutdown endpoint to trigger an ingester shutdown. This is a potentially dangerous operation and should only be enabled consciously.
-api.skip-label-count-validation-header-enabled
Allows to disable enforcement of the label count limit "max_label_names_per_series" via X-Mimir-SkipLabelCountValidation header on the http write path. Allowing this for external clients allows any client to send invalid label counts. After enabling it, requests with a specific HTTP header set to true will not have label counts validated.
-api.skip-label-name-validation-header-enabled
Allows to skip label name validation via X-Mimir-SkipLabelNameValidation header on the http write path. Use with caution as it breaks PromQL. Allowing this for external clients allows any client to send invalid label names. After enabling it, requests with a specific HTTP header set to true will not have label names validated.
-auth.multitenancy-enabled
Expand Down Expand Up @@ -1383,6 +1385,10 @@ Usage of ./cmd/mimir/mimir:
The maximum size of (uncompressed) buffered and unacknowledged produced records sent to Kafka. The produce request fails once this limit is reached. This limit is per Kafka client. 0 to disable the limit. (default 1073741824)
-ingest-storage.kafka.producer-max-record-size-bytes int
The maximum size of a Kafka record data that should be generated by the producer. An incoming write request larger than this size is split into multiple Kafka records. We strongly recommend to not change this setting unless for testing purposes. (default 15983616)
-ingest-storage.kafka.sasl-password string
The password used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.
-ingest-storage.kafka.sasl-username string
The username used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.
-ingest-storage.kafka.startup-fetch-concurrency int
The number of concurrent fetch requests that the ingester makes when reading data from Kafka during startup. 0 to disable.
-ingest-storage.kafka.startup-records-per-fetch int
Expand Down Expand Up @@ -1703,6 +1709,8 @@ Usage of ./cmd/mimir/mimir:
Size of memory ballast to allocate.
-memberlist.abort-if-join-fails
If this node fails to join memberlist cluster, abort.
-memberlist.acquire-writer-timeout duration
Timeout for acquiring one of the concurrent write slots. After this time, the message will be dropped. (default 250ms)
-memberlist.advertise-addr string
Gossip address to advertise to other members in the cluster. Used for NAT traversal.
-memberlist.advertise-port int
Expand Down Expand Up @@ -1733,6 +1741,8 @@ Usage of ./cmd/mimir/mimir:
Timeout for leaving memberlist cluster. (default 20s)
-memberlist.left-ingesters-timeout duration
How long to keep LEFT ingesters in the ring. (default 5m0s)
-memberlist.max-concurrent-writes int
Maximum number of concurrent writes to other nodes. (default 3)
-memberlist.max-join-backoff duration
Max backoff duration to join other cluster members. (default 1m0s)
-memberlist.max-join-retries int
Expand All @@ -1743,6 +1753,8 @@ Usage of ./cmd/mimir/mimir:
Min backoff duration to join other cluster members. (default 1s)
-memberlist.nodename string
Name of the node in memberlist cluster. Defaults to hostname.
-memberlist.notify-interval duration
How frequently to notify watchers when a key changes. Can reduce CPU activity in large memberlist deployments. 0 to notify without delay.
-memberlist.packet-dial-timeout duration
Timeout used when connecting to other nodes to send packet. (default 2s)
-memberlist.packet-write-timeout duration
Expand Down
4 changes: 4 additions & 0 deletions cmd/mimir/help.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ Usage of ./cmd/mimir/mimir:
The maximum size of (uncompressed) buffered and unacknowledged produced records sent to Kafka. The produce request fails once this limit is reached. This limit is per Kafka client. 0 to disable the limit. (default 1073741824)
-ingest-storage.kafka.producer-max-record-size-bytes int
The maximum size of a Kafka record data that should be generated by the producer. An incoming write request larger than this size is split into multiple Kafka records. We strongly recommend to not change this setting unless for testing purposes. (default 15983616)
-ingest-storage.kafka.sasl-password string
The password used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.
-ingest-storage.kafka.sasl-username string
The username used to authenticate to Kafka using the SASL plain mechanism. To enable SASL, configure both the username and password.
-ingest-storage.kafka.startup-fetch-concurrency int
The number of concurrent fetch requests that the ingester makes when reading data from Kafka during startup. 0 to disable.
-ingest-storage.kafka.startup-records-per-fetch int
Expand Down
3 changes: 3 additions & 0 deletions cmd/query-tee/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import (
"fmt"
"io"
"os"
"time"

"github.com/go-kit/log/level"
"github.com/grafana/dskit/flagext"
"github.com/grafana/dskit/log"
"github.com/grafana/dskit/tracing"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/common/model"
jaegercfg "github.com/uber/jaeger-client-go/config"

"github.com/grafana/mimir/pkg/util/instrumentation"
Expand Down Expand Up @@ -106,6 +108,7 @@ func mimirReadRoutes(cfg Config) []querytee.Route {
Tolerance: cfg.ProxyConfig.ValueComparisonTolerance,
UseRelativeError: cfg.ProxyConfig.UseRelativeError,
SkipRecentSamples: cfg.ProxyConfig.SkipRecentSamples,
SkipSamplesBefore: model.Time(time.Time(cfg.ProxyConfig.SkipSamplesBefore).UnixMilli()),
RequireExactErrorMatch: cfg.ProxyConfig.RequireExactErrorMatch,
})

Expand Down
32 changes: 32 additions & 0 deletions docs/sources/mimir/configure/configuration-parameters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ api:
# CLI flag: -api.skip-label-name-validation-header-enabled
[skip_label_name_validation_header_enabled: <boolean> | default = false]

# (advanced) Allows to disable enforcement of the label count limit
# "max_label_names_per_series" via X-Mimir-SkipLabelCountValidation header on
# the http write path. Allowing this for external clients allows any client to
# send invalid label counts. After enabling it, requests with a specific HTTP
# header set to true will not have label counts validated.
# CLI flag: -api.skip-label-count-validation-header-enabled
[skip_label_count_validation_header_enabled: <boolean> | default = false]

# (deprecated) Enable GET requests to the /ingester/shutdown endpoint to
# trigger an ingester shutdown. This is a potentially dangerous operation and
# should only be enabled consciously.
Expand Down Expand Up @@ -2959,6 +2967,11 @@ The `memberlist` block configures the Gossip memberlist.
# CLI flag: -memberlist.compression-enabled
[compression_enabled: <boolean> | default = true]
# (advanced) How frequently to notify watchers when a key changes. Can reduce
# CPU activity in large memberlist deployments. 0 to notify without delay.
# CLI flag: -memberlist.notify-interval
[notify_interval: <duration> | default = 0s]
# Gossip address to advertise to other members in the cluster. Used for NAT
# traversal.
# CLI flag: -memberlist.advertise-addr
Expand Down Expand Up @@ -3051,6 +3064,15 @@ The `memberlist` block configures the Gossip memberlist.
# CLI flag: -memberlist.packet-write-timeout
[packet_write_timeout: <duration> | default = 5s]
# (advanced) Maximum number of concurrent writes to other nodes.
# CLI flag: -memberlist.max-concurrent-writes
[max_concurrent_writes: <int> | default = 3]
# (advanced) Timeout for acquiring one of the concurrent write slots. After this
# time, the message will be dropped.
# CLI flag: -memberlist.acquire-writer-timeout
[acquire_writer_timeout: <duration> | default = 250ms]
# (advanced) Enable TLS on the memberlist transport layer.
# CLI flag: -memberlist.tls-enabled
[tls_enabled: <boolean> | default = false]
Expand Down Expand Up @@ -3781,6 +3803,16 @@ kafka:
# CLI flag: -ingest-storage.kafka.write-clients
[write_clients: <int> | default = 1]
# The username used to authenticate to Kafka using the SASL plain mechanism.
# To enable SASL, configure both the username and password.
# CLI flag: -ingest-storage.kafka.sasl-username
[sasl_username: <string> | default = ""]
# The password used to authenticate to Kafka using the SASL plain mechanism.
# To enable SASL, configure both the username and password.
# CLI flag: -ingest-storage.kafka.sasl-password
[sasl_password: <string> | default = ""]
# The consumer group used by the consumer to track the last consumed offset.
# The consumer group must be different for each ingester. If the configured
# consumer group contains the '<partition>' placeholder, it is replaced with
Expand Down
Loading

0 comments on commit 925e240

Please sign in to comment.