github.com/thanos-io/thanos@v0.32.5/internal/cortex/querier/querier.go (about) 1 // Copyright (c) The Cortex Authors. 2 // Licensed under the Apache License 2.0. 3 4 package querier 5 6 import ( 7 "time" 8 9 "github.com/thanos-io/thanos/internal/cortex/util/flagext" 10 ) 11 12 // Config contains the configuration require to create a querier 13 type Config struct { 14 MaxConcurrent int `yaml:"max_concurrent"` 15 Timeout time.Duration `yaml:"timeout"` 16 Iterators bool `yaml:"iterators"` 17 BatchIterators bool `yaml:"batch_iterators"` 18 IngesterStreaming bool `yaml:"ingester_streaming"` 19 IngesterMetadataStreaming bool `yaml:"ingester_metadata_streaming"` 20 MaxSamples int `yaml:"max_samples"` 21 QueryIngestersWithin time.Duration `yaml:"query_ingesters_within"` 22 QueryStoreForLabels bool `yaml:"query_store_for_labels_enabled"` 23 AtModifierEnabled bool `yaml:"at_modifier_enabled"` 24 EnablePerStepStats bool `yaml:"per_step_stats_enabled"` 25 26 // QueryStoreAfter the time after which queries should also be sent to the store and not just ingesters. 27 QueryStoreAfter time.Duration `yaml:"query_store_after"` 28 MaxQueryIntoFuture time.Duration `yaml:"max_query_into_future"` 29 30 // The default evaluation interval for the promql engine. 31 // Needs to be configured for subqueries to work as it is the default 32 // step if not specified. 33 DefaultEvaluationInterval time.Duration `yaml:"default_evaluation_interval"` 34 35 // Directory for ActiveQueryTracker. If empty, ActiveQueryTracker will be disabled and MaxConcurrent will not be applied (!). 36 // ActiveQueryTracker logs queries that were active during the last crash, but logs them on the next startup. 37 // However, we need to use active query tracker, otherwise we cannot limit Max Concurrent queries in the PromQL 38 // engine. 39 ActiveQueryTrackerDir string `yaml:"active_query_tracker_dir"` 40 // LookbackDelta determines the time since the last sample after which a time 41 // series is considered stale. 42 LookbackDelta time.Duration `yaml:"lookback_delta"` 43 44 SecondStoreEngine string `yaml:"second_store_engine"` 45 UseSecondStoreBeforeTime flagext.Time `yaml:"use_second_store_before_time"` 46 47 ShuffleShardingIngestersLookbackPeriod time.Duration `yaml:"shuffle_sharding_ingesters_lookback_period"` 48 }