Skip to content

Commit

Permalink
Distributor: Make -distributor.enable-otlp-metadata-storage flag de…
Browse files Browse the repository at this point in the history
…fault to true, and deprecate (#7366)

* Distributor: Change -distributor.enable-otlp-metadata-storage flag's default to true and deprecate

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
  • Loading branch information
aknuds1 committed Feb 12, 2024
1 parent c64463e commit e502e1e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* [CHANGE] Tracing: Move query information to span attributes instead of span logs. #7046
* [CHANGE] Distributor: the default value of circuit breaker's CLI flag `-ingester.client.circuit-breaker.cooldown-period` has been changed from `1m` to `10s`. #7310
* [CHANGE] Store-gateway: remove `cortex_bucket_store_blocks_loaded_by_duration`. `cortex_bucket_store_series_blocks_queried` is better suited for detecting when compactors are not able to keep up with the number of blocks to compact. #7309
* [CHANGE] Distributor: Change`-distributor.enable-otlp-metadata-storage` flag's default to true, and deprecate it. The flag will be removed in Mimir 2.14. #7366
* [FEATURE] Introduce `-server.log-source-ips-full` option to log all IPs from `Forwarded`, `X-Real-IP`, `X-Forwarded-For` headers. #7250
* [FEATURE] Introduce `-tenant-federation.max-tenants` option to limit the max number of tenants allowed for requests when federation is enabled. #6959
* [FEATURE] Cardinality API: added a new `count_method` parameter which enables counting active label values. #7085
Expand Down
4 changes: 2 additions & 2 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
"required": false,
"desc": "If true, store metadata when ingesting metrics via OTLP. This makes metric descriptions and types available for metrics ingested via OTLP.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldDefaultValue": true,
"fieldFlag": "distributor.enable-otlp-metadata-storage",
"fieldType": "boolean",
"fieldCategory": "experimental"
"fieldCategory": "deprecated"
},
{
"kind": "field",
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ Usage of ./cmd/mimir/mimir:
-distributor.drop-label string
This flag can be used to specify label names that to drop during sample ingestion within the distributor and can be repeated in order to drop multiple labels.
-distributor.enable-otlp-metadata-storage
[experimental] If true, store metadata when ingesting metrics via OTLP. This makes metric descriptions and types available for metrics ingested via OTLP.
[deprecated] If true, store metadata when ingesting metrics via OTLP. This makes metric descriptions and types available for metrics ingested via OTLP. (default true)
-distributor.ha-tracker.cluster string
Prometheus label to look for in samples to identify a Prometheus HA cluster. (default "cluster")
-distributor.ha-tracker.consul.acl-token string
Expand Down
3 changes: 0 additions & 3 deletions docs/sources/mimir/configure/about-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ The following features are currently experimental:
- Distributor
- Metrics relabeling
- `-distributor.metric-relabeling-enabled`
- OTLP ingestion path
- OTLP metadata storage
- `-distributor.enable-otlp-metadata-storage`
- Using status code 529 instead of 429 upon rate limit exhaustion.
- `distributor.service-overload-status-code-on-rate-limit-enabled`
- Set Retry-After header in recoverable error responses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ api:
# CLI flag: -api.skip-label-name-validation-header-enabled
[skip_label_name_validation_header_enabled: <boolean> | default = false]

# (experimental) If true, store metadata when ingesting metrics via OTLP. This
# (deprecated) If true, store metadata when ingesting metrics via OTLP. This
# makes metric descriptions and types available for metrics ingested via OTLP.
# CLI flag: -distributor.enable-otlp-metadata-storage
[enable_otel_metadata_translation: <boolean> | default = false]
[enable_otel_metadata_translation: <boolean> | default = true]

# (advanced) HTTP URL path under which the Alertmanager ui and api will be
# served.
Expand Down
5 changes: 3 additions & 2 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ type ConfigHandler func(actualCfg interface{}, defaultCfg interface{}) http.Hand
type Config struct {
SkipLabelNameValidationHeader bool `yaml:"skip_label_name_validation_header_enabled" category:"advanced"`

EnableOtelMetadataStorage bool `yaml:"enable_otel_metadata_translation" category:"experimental"`
// TODO: Remove option in Mimir 2.14.
EnableOtelMetadataStorage bool `yaml:"enable_otel_metadata_translation" category:"deprecated"`

AlertmanagerHTTPPrefix string `yaml:"alertmanager_http_prefix" category:"advanced"`
PrometheusHTTPPrefix string `yaml:"prometheus_http_prefix" category:"advanced"`
Expand All @@ -71,7 +72,7 @@ type Config struct {
// RegisterFlags adds the flags required to config this to the given FlagSet.
func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
f.BoolVar(&cfg.SkipLabelNameValidationHeader, "api.skip-label-name-validation-header-enabled", false, "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.")
f.BoolVar(&cfg.EnableOtelMetadataStorage, "distributor.enable-otlp-metadata-storage", false, "If true, store metadata when ingesting metrics via OTLP. This makes metric descriptions and types available for metrics ingested via OTLP.")
f.BoolVar(&cfg.EnableOtelMetadataStorage, "distributor.enable-otlp-metadata-storage", true, "If true, store metadata when ingesting metrics via OTLP. This makes metric descriptions and types available for metrics ingested via OTLP.")
cfg.RegisterFlagsWithPrefix("", f)
}

Expand Down

0 comments on commit e502e1e

Please sign in to comment.