Documentation ¶
Index ¶
- Constants
- Variables
- func SetDefaultLimitsForYAMLUnmarshalling(defaults Limits)
- func TenantLimitsHandler(defaultLimits Limits, tenantLimits TenantLimits) http.HandlerFunc
- func ValidateLabels(limits LabelValidationLimits, tenantID string, ls []*typesv1.LabelPair) error
- func ValidateMaxNodes(l FlameGraphLimits, tenantIDs []string, n int64) (int64, error)
- func ValidateProfile(limits ProfileValidationLimits, tenantID string, prof *googlev1.Profile, ...) error
- type Error
- type FlameGraphLimits
- type LabelValidationLimits
- type LimitError
- type Limits
- type MockLimits
- func (m MockLimits) DistributorAggregationPeriod(userID string) time.Duration
- func (m MockLimits) DistributorAggregationWindow(userID string) time.Duration
- func (m MockLimits) MaxFlameGraphNodesDefault(string) int
- func (m MockLimits) MaxFlameGraphNodesMax(string) int
- func (m MockLimits) MaxLabelNameLength(userID string) int
- func (m MockLimits) MaxLabelNamesPerSeries(userID string) int
- func (m MockLimits) MaxLabelValueLength(userID string) int
- func (m MockLimits) MaxProfileSizeBytes(userID string) int
- func (m MockLimits) MaxProfileStacktraceDepth(userID string) int
- func (m MockLimits) MaxProfileStacktraceSampleLabels(userID string) int
- func (m MockLimits) MaxProfileStacktraceSamples(userID string) int
- func (m MockLimits) MaxProfileSymbolValueLength(userID string) int
- func (m MockLimits) MaxQueryLength(tenantID string) time.Duration
- func (m MockLimits) MaxQueryLookback(tenantID string) time.Duration
- func (m MockLimits) MaxQueryParallelism(string) int
- func (m MockLimits) QueryAnalysisEnabled(tenantID string) bool
- func (m MockLimits) QueryAnalysisSeriesEnabled(tenantID string) bool
- func (m MockLimits) QuerySplitDuration(string) time.Duration
- func (m MockLimits) RejectNewerThan(userID string) time.Duration
- func (m MockLimits) RejectOlderThan(userID string) time.Duration
- type Overrides
- func (o *Overrides) AllByTenantID() map[string]*Limits
- func (o *Overrides) CompactorBlocksRetentionPeriod(userID string) time.Duration
- func (o *Overrides) CompactorDownsamplerEnabled(userId string) bool
- func (o *Overrides) CompactorPartialBlockDeletionDelay(userID string) (delay time.Duration, valid bool)
- func (o *Overrides) CompactorSplitAndMergeShards(userID string) int
- func (o *Overrides) CompactorSplitAndMergeStageSize(userID string) int
- func (o *Overrides) CompactorSplitGroups(userID string) int
- func (o *Overrides) CompactorTenantShardSize(userID string) int
- func (o *Overrides) DefaultLimits() *Limits
- func (o *Overrides) DistributorAggregationPeriod(tenantID string) model.Duration
- func (o *Overrides) DistributorAggregationWindow(tenantID string) model.Duration
- func (o *Overrides) IngestionBurstSizeBytes(tenantID string) int
- func (o *Overrides) IngestionRateBytes(tenantID string) float64
- func (o *Overrides) IngestionTenantShardSize(tenantID string) int
- func (o *Overrides) MaxFlameGraphNodesDefault(tenantID string) int
- func (o *Overrides) MaxFlameGraphNodesMax(tenantID string) int
- func (o *Overrides) MaxGlobalSeriesPerTenant(tenantID string) int
- func (o *Overrides) MaxLabelNameLength(tenantID string) int
- func (o *Overrides) MaxLabelNamesPerSeries(tenantID string) int
- func (o *Overrides) MaxLabelValueLength(tenantID string) int
- func (o *Overrides) MaxLocalSeriesPerTenant(tenantID string) int
- func (o *Overrides) MaxProfileSizeBytes(tenantID string) int
- func (o *Overrides) MaxProfileStacktraceDepth(tenantID string) int
- func (o *Overrides) MaxProfileStacktraceSampleLabels(tenantID string) int
- func (o *Overrides) MaxProfileStacktraceSamples(tenantID string) int
- func (o *Overrides) MaxProfileSymbolValueLength(tenantID string) int
- func (o *Overrides) MaxQueriersPerTenant(tenant string) int
- func (o *Overrides) MaxQueryLength(tenantID string) time.Duration
- func (o *Overrides) MaxQueryLookback(tenantID string) time.Duration
- func (o *Overrides) MaxQueryParallelism(tenantID string) int
- func (o *Overrides) MaxSessionsPerSeries(tenantID string) int
- func (o *Overrides) QueryAnalysisEnabled(tenantID string) bool
- func (o *Overrides) QueryAnalysisSeriesEnabled(tenantID string) bool
- func (o *Overrides) QuerySplitDuration(tenantID string) time.Duration
- func (o *Overrides) RejectNewerThan(tenantID string) time.Duration
- func (o *Overrides) RejectOlderThan(tenantID string) time.Duration
- func (o *Overrides) S3SSEKMSEncryptionContext(user string) string
- func (o *Overrides) S3SSEKMSKeyID(user string) string
- func (o *Overrides) S3SSEType(user string) string
- func (o *Overrides) StoreGatewayTenantShardSize(userID string) int
- type OverwriteMarshalingStringMap
- func (sm *OverwriteMarshalingStringMap) Map() map[string]string
- func (sm OverwriteMarshalingStringMap) MarshalJSON() ([]byte, error)
- func (sm OverwriteMarshalingStringMap) MarshalYAML() (interface{}, error)
- func (sm *OverwriteMarshalingStringMap) UnmarshalJSON(val []byte) error
- func (sm *OverwriteMarshalingStringMap) UnmarshalYAML(unmarshal func(interface{}) error) error
- type ProfileValidationLimits
- type RangeRequestLimits
- type Reason
- type TenantLimits
- type TenantLimitsResponse
- type ValidatedRangeRequest
Constants ¶
const ( ReasonLabel string = "reason" Unknown Reason = "unknown" // InvalidLabels is a reason for discarding profiles which have labels that are invalid. InvalidLabels Reason = "invalid_labels" // MissingLabels is a reason for discarding profiles which have no labels. MissingLabels Reason = "missing_labels" // RateLimited is one of the values for the reason to discard samples. RateLimited Reason = "rate_limited" // NotInIngestionWindow is a reason for discarding profiles when Pyroscope doesn't accept profiles // that are outside of the ingestion window. NotInIngestionWindow Reason = "not_in_ingestion_window" // MaxLabelNamesPerSeries is a reason for discarding a request which has too many label names MaxLabelNamesPerSeries Reason = "max_label_names_per_series" // LabelNameTooLong is a reason for discarding a request which has a label name too long LabelNameTooLong Reason = "label_name_too_long" // LabelValueTooLong is a reason for discarding a request which has a label value too long LabelValueTooLong Reason = "label_value_too_long" // DuplicateLabelNames is a reason for discarding a request which has duplicate label names DuplicateLabelNames Reason = "duplicate_label_names" // SeriesLimit is a reason for discarding lines when we can't create a new stream // because the limit of active streams has been reached. SeriesLimit Reason = "series_limit" QueryLimit Reason = "query_limit" SamplesLimit Reason = "samples_limit" ProfileSizeLimit Reason = "profile_size_limit" SampleLabelsLimit Reason = "sample_labels_limit" MalformedProfile Reason = "malformed_profile" FlameGraphLimit Reason = "flamegraph_limit" SeriesLimitErrorMsg = "" /* 188-byte string literal not displayed */ MissingLabelsErrorMsg = "error at least one label pair is required per profile" InvalidLabelsErrorMsg = "invalid labels '%s' with error: %s" MaxLabelNamesPerSeriesErrorMsg = "profile series '%s' has %d label names; limit %d" LabelNameTooLongErrorMsg = "profile with labels '%s' has label name too long: '%s'" LabelValueTooLongErrorMsg = "profile with labels '%s' has label value too long: '%s'" DuplicateLabelNamesErrorMsg = "profile with labels '%s' has duplicate label name: '%s'" QueryTooLongErrorMsg = "the query time range exceeds the limit (max_query_length, actual: %s, limit: %s)" ProfileTooBigErrorMsg = "the profile with labels '%s' exceeds the size limit (max_profile_size_byte, actual: %d, limit: %d)" ProfileTooManySamplesErrorMsg = "the profile with labels '%s' exceeds the samples count limit (max_profile_stacktrace_samples, actual: %d, limit: %d)" ProfileTooManySampleLabelsErrorMsg = "the profile with labels '%s' exceeds the sample labels limit (max_profile_stacktrace_sample_labels, actual: %d, limit: %d)" NotInIngestionWindowErrorMsg = "profile with labels '%s' is outside of ingestion window (profile timestamp: %s, %s)" MaxFlameGraphNodesErrorMsg = "max flamegraph nodes limit %d is greater than allowed %d" MaxFlameGraphNodesUnlimitedErrorMsg = "max flamegraph nodes limit must be set (max allowed %d)" )
const ( // MinCompactorPartialBlockDeletionDelay is the minimum partial blocks deletion delay that can be configured in Mimir. // Partial blocks are blocks that are not having meta file uploaded yet. MinCompactorPartialBlockDeletionDelay = 4 * time.Hour )
Variables ¶
var ( // DiscardedBytes is a metric of the total discarded bytes, by reason. DiscardedBytes = promauto.NewCounterVec( prometheus.CounterOpts{ Namespace: "pyroscope", Name: "discarded_bytes_total", Help: "The total number of bytes that were discarded.", }, []string{ReasonLabel, "tenant"}, ) // DiscardedProfiles is a metric of the number of discarded profiles, by reason. DiscardedProfiles = promauto.NewCounterVec( prometheus.CounterOpts{ Namespace: "pyroscope", Name: "discarded_samples_total", Help: "The total number of samples that were discarded.", }, []string{ReasonLabel, "tenant"}, ) )
Functions ¶
func SetDefaultLimitsForYAMLUnmarshalling ¶
func SetDefaultLimitsForYAMLUnmarshalling(defaults Limits)
SetDefaultLimitsForYAMLUnmarshalling sets global default limits, used when loading Limits from YAML files. This is used to ensure per-tenant limits are defaulted to those values.
func TenantLimitsHandler ¶
func TenantLimitsHandler(defaultLimits Limits, tenantLimits TenantLimits) http.HandlerFunc
TenantLimitsHandler handles user limits.
func ValidateLabels ¶
func ValidateLabels(limits LabelValidationLimits, tenantID string, ls []*typesv1.LabelPair) error
ValidateLabels validates the labels of a profile.
func ValidateMaxNodes ¶ added in v1.2.0
func ValidateMaxNodes(l FlameGraphLimits, tenantIDs []string, n int64) (int64, error)
func ValidateProfile ¶
func ValidateProfile(limits ProfileValidationLimits, tenantID string, prof *googlev1.Profile, uncompressedSize int, ls phlaremodel.Labels, now model.Time) error
Types ¶
type FlameGraphLimits ¶ added in v1.2.0
type LabelValidationLimits ¶
type LimitError ¶
type LimitError string
LimitError are errors that do not comply with the limits specified.
func (LimitError) Error ¶
func (e LimitError) Error() string
type Limits ¶
type Limits struct { // Distributor enforced limits. IngestionRateMB float64 `yaml:"ingestion_rate_mb" json:"ingestion_rate_mb"` IngestionBurstSizeMB float64 `yaml:"ingestion_burst_size_mb" json:"ingestion_burst_size_mb"` MaxLabelNameLength int `yaml:"max_label_name_length" json:"max_label_name_length"` MaxLabelValueLength int `yaml:"max_label_value_length" json:"max_label_value_length"` MaxLabelNamesPerSeries int `yaml:"max_label_names_per_series" json:"max_label_names_per_series"` MaxSessionsPerSeries int `yaml:"max_sessions_per_series" json:"max_sessions_per_series"` MaxProfileSizeBytes int `yaml:"max_profile_size_bytes" json:"max_profile_size_bytes"` MaxProfileStacktraceSamples int `yaml:"max_profile_stacktrace_samples" json:"max_profile_stacktrace_samples"` MaxProfileStacktraceSampleLabels int `yaml:"max_profile_stacktrace_sample_labels" json:"max_profile_stacktrace_sample_labels"` MaxProfileStacktraceDepth int `yaml:"max_profile_stacktrace_depth" json:"max_profile_stacktrace_depth"` MaxProfileSymbolValueLength int `yaml:"max_profile_symbol_value_length" json:"max_profile_symbol_value_length"` // Distributor aggregation. DistributorAggregationWindow model.Duration `yaml:"distributor_aggregation_window" json:"distributor_aggregation_window"` DistributorAggregationPeriod model.Duration `yaml:"distributor_aggregation_period" json:"distributor_aggregation_period"` // The tenant shard size determines the how many ingesters a particular // tenant will be sharded to. Needs to be specified on distributors for // correct distribution and on ingesters so that the local ingestion limit // can be calculated correctly. IngestionTenantShardSize int `yaml:"ingestion_tenant_shard_size" json:"ingestion_tenant_shard_size"` // Ingester enforced limits. MaxLocalSeriesPerTenant int `yaml:"max_local_series_per_tenant" json:"max_local_series_per_tenant"` MaxGlobalSeriesPerTenant int `yaml:"max_global_series_per_tenant" json:"max_global_series_per_tenant"` // Querier enforced limits. MaxQueryLookback model.Duration `yaml:"max_query_lookback" json:"max_query_lookback"` MaxQueryLength model.Duration `yaml:"max_query_length" json:"max_query_length"` MaxQueryParallelism int `yaml:"max_query_parallelism" json:"max_query_parallelism"` QueryAnalysisEnabled bool `yaml:"query_analysis_enabled" json:"query_analysis_enabled"` QueryAnalysisSeriesEnabled bool `yaml:"query_analysis_series_enabled" json:"query_analysis_series_enabled"` // Flame graph enforced limits. MaxFlameGraphNodesDefault int `yaml:"max_flamegraph_nodes_default" json:"max_flamegraph_nodes_default"` MaxFlameGraphNodesMax int `yaml:"max_flamegraph_nodes_max" json:"max_flamegraph_nodes_max"` // Store-gateway. StoreGatewayTenantShardSize int `yaml:"store_gateway_tenant_shard_size" json:"store_gateway_tenant_shard_size"` // Query frontend. QuerySplitDuration model.Duration `yaml:"split_queries_by_interval" json:"split_queries_by_interval"` // Compactor. CompactorBlocksRetentionPeriod model.Duration `yaml:"compactor_blocks_retention_period" json:"compactor_blocks_retention_period"` CompactorSplitAndMergeShards int `yaml:"compactor_split_and_merge_shards" json:"compactor_split_and_merge_shards"` CompactorSplitAndMergeStageSize int `yaml:"compactor_split_and_merge_stage_size" json:"compactor_split_and_merge_stage_size"` CompactorSplitGroups int `yaml:"compactor_split_groups" json:"compactor_split_groups"` CompactorTenantShardSize int `yaml:"compactor_tenant_shard_size" json:"compactor_tenant_shard_size"` CompactorPartialBlockDeletionDelay model.Duration `yaml:"compactor_partial_block_deletion_delay" json:"compactor_partial_block_deletion_delay"` CompactorDownsamplerEnabled bool `yaml:"compactor_downsampler_enabled" json:"compactor_downsampler_enabled"` // This config doesn't have a CLI flag registered here because they're registered in // their own original config struct. S3SSEType string `` /* 221-byte string literal not displayed */ S3SSEKMSKeyID string `` /* 156-byte string literal not displayed */ S3SSEKMSEncryptionContext string `` /* 284-byte string literal not displayed */ // Ensure profiles are dated within the IngestionWindow of the distributor. RejectOlderThan model.Duration `yaml:"reject_older_than" json:"reject_older_than"` RejectNewerThan model.Duration `yaml:"reject_newer_than" json:"reject_newer_than"` }
Limits describe all the limits for tenants; can be used to describe global default limits via flags, or per-tenant limits via yaml config. NOTE: we use custom `model.Duration` instead of standard `time.Duration` because, to support tenant-friendly duration format (e.g: "1h30m45s") in JSON value.
func MockDefaultLimits ¶
func MockDefaultLimits() *Limits
func (*Limits) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet
func (*Limits) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type MockLimits ¶
type MockLimits struct { QuerySplitDurationValue time.Duration MaxQueryParallelismValue int MaxQueryLengthValue time.Duration MaxQueryLookbackValue time.Duration QueryAnalysisEnabledValue bool QueryAnalysisSeriesEnabledValue bool MaxLabelNameLengthValue int MaxLabelValueLengthValue int MaxLabelNamesPerSeriesValue int MaxFlameGraphNodesDefaultValue int MaxFlameGraphNodesMaxValue int DistributorAggregationWindowValue time.Duration DistributorAggregationPeriodValue time.Duration RejectOlderThanValue time.Duration RejectNewerThanValue time.Duration MaxProfileSizeBytesValue int MaxProfileStacktraceSamplesValue int MaxProfileStacktraceDepthValue int MaxProfileStacktraceSampleLabelsValue int MaxProfileSymbolValueLengthValue int }
func (MockLimits) DistributorAggregationPeriod ¶ added in v1.2.0
func (m MockLimits) DistributorAggregationPeriod(userID string) time.Duration
func (MockLimits) DistributorAggregationWindow ¶ added in v1.2.0
func (m MockLimits) DistributorAggregationWindow(userID string) time.Duration
func (MockLimits) MaxFlameGraphNodesDefault ¶ added in v1.2.0
func (m MockLimits) MaxFlameGraphNodesDefault(string) int
func (MockLimits) MaxFlameGraphNodesMax ¶ added in v1.2.0
func (m MockLimits) MaxFlameGraphNodesMax(string) int
func (MockLimits) MaxLabelNameLength ¶
func (m MockLimits) MaxLabelNameLength(userID string) int
func (MockLimits) MaxLabelNamesPerSeries ¶
func (m MockLimits) MaxLabelNamesPerSeries(userID string) int
func (MockLimits) MaxLabelValueLength ¶
func (m MockLimits) MaxLabelValueLength(userID string) int
func (MockLimits) MaxProfileSizeBytes ¶
func (m MockLimits) MaxProfileSizeBytes(userID string) int
func (MockLimits) MaxProfileStacktraceDepth ¶
func (m MockLimits) MaxProfileStacktraceDepth(userID string) int
func (MockLimits) MaxProfileStacktraceSampleLabels ¶
func (m MockLimits) MaxProfileStacktraceSampleLabels(userID string) int
func (MockLimits) MaxProfileStacktraceSamples ¶
func (m MockLimits) MaxProfileStacktraceSamples(userID string) int
func (MockLimits) MaxProfileSymbolValueLength ¶
func (m MockLimits) MaxProfileSymbolValueLength(userID string) int
func (MockLimits) MaxQueryLength ¶
func (m MockLimits) MaxQueryLength(tenantID string) time.Duration
func (MockLimits) MaxQueryLookback ¶
func (m MockLimits) MaxQueryLookback(tenantID string) time.Duration
func (MockLimits) MaxQueryParallelism ¶
func (m MockLimits) MaxQueryParallelism(string) int
func (MockLimits) QueryAnalysisEnabled ¶ added in v1.6.0
func (m MockLimits) QueryAnalysisEnabled(tenantID string) bool
func (MockLimits) QueryAnalysisSeriesEnabled ¶ added in v1.6.0
func (m MockLimits) QueryAnalysisSeriesEnabled(tenantID string) bool
func (MockLimits) QuerySplitDuration ¶
func (m MockLimits) QuerySplitDuration(string) time.Duration
func (MockLimits) RejectNewerThan ¶ added in v1.1.0
func (m MockLimits) RejectNewerThan(userID string) time.Duration
func (MockLimits) RejectOlderThan ¶ added in v1.1.0
func (m MockLimits) RejectOlderThan(userID string) time.Duration
type Overrides ¶
type Overrides struct {
// contains filtered or unexported fields
}
Overrides periodically fetch a set of per-tenant overrides, and provides convenience functions for fetching the correct value.
func MockDefaultOverrides ¶
func MockDefaultOverrides() *Overrides
func MockOverrides ¶
func NewOverrides ¶
func NewOverrides(defaults Limits, tenantLimits TenantLimits) (*Overrides, error)
NewOverrides makes a new Overrides.
func (*Overrides) AllByTenantID ¶
func (*Overrides) CompactorBlocksRetentionPeriod ¶ added in v1.2.0
CompactorBlocksRetentionPeriod returns the retention period for a given user.
func (*Overrides) CompactorDownsamplerEnabled ¶ added in v1.3.0
CompactorDownsamplerEnabled returns true if the downsampler is enabled for a given user.
func (*Overrides) CompactorPartialBlockDeletionDelay ¶ added in v1.2.0
func (o *Overrides) CompactorPartialBlockDeletionDelay(userID string) (delay time.Duration, valid bool)
CompactorPartialBlockDeletionDelay returns the partial block deletion delay time period for a given user, and whether the configured value was valid. If the value wasn't valid, the returned delay is the default one and the caller is responsible to warn the Mimir operator about it.
func (*Overrides) CompactorSplitAndMergeShards ¶ added in v1.2.0
CompactorSplitAndMergeShards returns the number of shards to use when splitting blocks.
func (*Overrides) CompactorSplitAndMergeStageSize ¶ added in v1.2.0
CompactorSplitAndMergeStageSize returns the number of stages split shards will be written to.
func (*Overrides) CompactorSplitGroups ¶ added in v1.2.0
CompactorSplitGroups returns the number of groups that blocks for splitting should be grouped into.
func (*Overrides) CompactorTenantShardSize ¶ added in v1.2.0
CompactorTenantShardSize returns number of compactors that this user can use. 0 = all compactors.
func (*Overrides) DefaultLimits ¶
func (*Overrides) DistributorAggregationPeriod ¶ added in v1.2.0
func (*Overrides) DistributorAggregationWindow ¶ added in v1.2.0
func (*Overrides) IngestionBurstSizeBytes ¶
IngestionBurstSizeBytes returns the burst size for ingestion rate.
func (*Overrides) IngestionRateBytes ¶
IngestionRateBytes returns the limit on ingester rate (MBs per second).
func (*Overrides) IngestionTenantShardSize ¶
IngestionTenantShardSize returns the ingesters shard size for a given user.
func (*Overrides) MaxFlameGraphNodesDefault ¶ added in v1.2.0
MaxFlameGraphNodesDefault returns the max flame graph nodes used by default.
func (*Overrides) MaxFlameGraphNodesMax ¶ added in v1.2.0
MaxFlameGraphNodesMax returns the max flame graph nodes allowed.
func (*Overrides) MaxGlobalSeriesPerTenant ¶
MaxGlobalSeriesPerTenant returns the maximum number of series a tenant is allowed to store across the cluster.
func (*Overrides) MaxLabelNameLength ¶
MaxLabelNameLength returns maximum length a label name can be.
func (*Overrides) MaxLabelNamesPerSeries ¶
MaxLabelNamesPerSeries returns maximum number of label/value pairs timeseries.
func (*Overrides) MaxLabelValueLength ¶
MaxLabelValueLength returns maximum length a label value can be. This also is the maximum length of a metric name.
func (*Overrides) MaxLocalSeriesPerTenant ¶
MaxLocalSeriesPerTenant returns the maximum number of series a tenant is allowed to store in a single ingester.
func (*Overrides) MaxProfileSizeBytes ¶
MaxProfileSizeBytes returns the maximum size of a profile in bytes.
func (*Overrides) MaxProfileStacktraceDepth ¶
MaxProfileStacktraceDepth returns the maximum depth of a profile stacktrace.
func (*Overrides) MaxProfileStacktraceSampleLabels ¶
MaxProfileStacktraceSampleLabels returns the maximum number of labels in a profile sample.
func (*Overrides) MaxProfileStacktraceSamples ¶
MaxProfileStacktraceSamples returns the maximum number of samples in a profile.
func (*Overrides) MaxProfileSymbolValueLength ¶
MaxProfileSymbolValueLength returns the maximum length of a profile symbol value (labels, function name and filename, etc...).
func (*Overrides) MaxQueriersPerTenant ¶
MaxQueriersPerTenant returns the limit to the number of queriers that can be used Shuffle sharding will be used to distribute queries across queriers. 0 means no limit. Currently disabled.
func (*Overrides) MaxQueryLength ¶
MaxQueryLength returns the limit of the length (in time) of a query.
func (*Overrides) MaxQueryLookback ¶
MaxQueryLookback returns the max lookback period of queries.
func (*Overrides) MaxQueryParallelism ¶
MaxQueryParallelism returns the limit to the number of sub-queries the frontend will process in parallel.
func (*Overrides) MaxSessionsPerSeries ¶ added in v1.1.0
MaxSessionsPerSeries returns the maximum number of sessions per single series.
func (*Overrides) QueryAnalysisEnabled ¶ added in v1.6.0
QueryAnalysisEnabled can be used to disable the query analysis endpoint in the query frontend.
func (*Overrides) QueryAnalysisSeriesEnabled ¶ added in v1.6.0
QueryAnalysisSeriesEnabled can be used to disable the series portion of the query analysis endpoint in the query frontend. To be used for tenants where calculating series can be expensive.
func (*Overrides) QuerySplitDuration ¶
QuerySplitDuration returns the tenant specific split by interval applied in the query frontend.
func (*Overrides) RejectNewerThan ¶ added in v1.1.0
RejectNewerThan will ensure that profiles are further than the return value into the future are reject.
func (*Overrides) RejectOlderThan ¶ added in v1.1.0
RejectOlderThan will ensure that profiles that are older than the return value are rejected.
func (*Overrides) S3SSEKMSEncryptionContext ¶ added in v1.2.0
S3SSEKMSEncryptionContext returns the per-tenant S3 KMS-SSE encryption context.
func (*Overrides) S3SSEKMSKeyID ¶ added in v1.2.0
S3SSEKMSKeyID returns the per-tenant S3 KMS-SSE key id.
func (*Overrides) StoreGatewayTenantShardSize ¶
StoreGatewayTenantShardSize returns the store-gateway shard size for a given user.
type OverwriteMarshalingStringMap ¶
type OverwriteMarshalingStringMap struct {
// contains filtered or unexported fields
}
OverwriteMarshalingStringMap will overwrite the src map when unmarshaling as opposed to merging.
func NewOverwriteMarshalingStringMap ¶
func NewOverwriteMarshalingStringMap(m map[string]string) OverwriteMarshalingStringMap
func (*OverwriteMarshalingStringMap) Map ¶
func (sm *OverwriteMarshalingStringMap) Map() map[string]string
func (OverwriteMarshalingStringMap) MarshalJSON ¶
func (sm OverwriteMarshalingStringMap) MarshalJSON() ([]byte, error)
MarshalJSON explicitly uses the type receiver and not pointer receiver or it won't be called
func (OverwriteMarshalingStringMap) MarshalYAML ¶
func (sm OverwriteMarshalingStringMap) MarshalYAML() (interface{}, error)
MarshalYAML explicitly uses the type receiver and not pointer receiver or it won't be called
func (*OverwriteMarshalingStringMap) UnmarshalJSON ¶
func (sm *OverwriteMarshalingStringMap) UnmarshalJSON(val []byte) error
func (*OverwriteMarshalingStringMap) UnmarshalYAML ¶
func (sm *OverwriteMarshalingStringMap) UnmarshalYAML(unmarshal func(interface{}) error) error
type ProfileValidationLimits ¶
type ProfileValidationLimits interface { MaxProfileSizeBytes(tenantID string) int MaxProfileStacktraceSamples(tenantID string) int MaxProfileStacktraceSampleLabels(tenantID string) int MaxProfileStacktraceDepth(tenantID string) int MaxProfileSymbolValueLength(tenantID string) int RejectNewerThan(tenantID string) time.Duration RejectOlderThan(tenantID string) time.Duration }
type RangeRequestLimits ¶
type TenantLimits ¶
type TenantLimits interface { // TenantLimits is a function that returns limits for given tenant, or // nil, if there are no tenant-specific limits. TenantLimits(tenantID string) *Limits // AllByTenantID gets a mapping of all tenant IDs and limits for that tenant AllByTenantID() map[string]*Limits }
func NewMockTenantLimits ¶
func NewMockTenantLimits(limits map[string]*Limits) TenantLimits
NewMockTenantLimits creates a new mockTenantLimits that returns per-tenant limits based on the given map
type TenantLimitsResponse ¶
type ValidatedRangeRequest ¶
func ValidateRangeRequest ¶
func ValidateRangeRequest(limits RangeRequestLimits, tenantIDs []string, req model.Interval, now model.Time) (ValidatedRangeRequest, error)