Documentation ¶
Index ¶
- Constants
- func IntersectionPerTenant(tenantIDs []string, f func(string) []string) []string
- func MaxDurationOrZeroPerTenant(tenantIDs []string, f func(string) time.Duration) time.Duration
- func MaxDurationPerTenant(tenantIDs []string, f func(string) time.Duration) time.Duration
- func SmallestPositiveIntPerTenant(tenantIDs []string, f func(string) int) int
- func SmallestPositiveNonZeroDurationPerTenant(tenantIDs []string, f func(string) time.Duration) time.Duration
- func SmallestPositiveNonZeroIntPerTenant(tenantIDs []string, f func(string) int) int
- type BlockedQuery
- type NotificationRateLimitMap
Constants ¶
const ( // ErrQueryTooLong is used in chunk store, querier and query frontend. ErrQueryTooLong = "the query time range exceeds the limit (query length: %s, limit: %s)" ErrQueryTooOld = "this data is no longer available, it is past now - max_query_lookback (%s)" // RateLimited is one of the values for the reason to discard samples. // Declared here to avoid duplication in ingester and distributor. RateLimited = "rate_limited" // Too many HA clusters is one of the reasons for discarding samples. TooManyHAClusters = "too_many_ha_clusters" // DroppedByRelabelConfiguration Samples can also be discarded because of relabeling configuration DroppedByRelabelConfiguration = "relabel_configuration" // DroppedByUserConfigurationOverride Samples discarded due to user configuration removing label __name__ DroppedByUserConfigurationOverride = "user_label_removal_configuration" // The combined length of the label names and values of an Exemplar's LabelSet MUST NOT exceed 128 UTF-8 characters // https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars ExemplarMaxLabelSetLength = 128 )
Variables ¶
This section is empty.
Functions ¶
func IntersectionPerTenant ¶ added in v3.3.0
IntersectionPerTenant is returning the intersection of feature flags. This is useful to determine the minimal feature set supported.
func MaxDurationOrZeroPerTenant ¶
MaxDurationOrZeroPerTenant is returning the maximum duration per tenant or zero if one tenant has time.Duration(0).
func MaxDurationPerTenant ¶
MaxDurationPerTenant is returning the maximum duration per tenant. Without tenants given it will return a time.Duration(0).
func SmallestPositiveIntPerTenant ¶
SmallestPositiveIntPerTenant is returning the minimal positive value of the supplied limit function for all given tenants.
func SmallestPositiveNonZeroDurationPerTenant ¶
func SmallestPositiveNonZeroDurationPerTenant(tenantIDs []string, f func(string) time.Duration) time.Duration
SmallestPositiveNonZeroDurationPerTenant is returning the minimal positive and non-zero value of the supplied limit function for all given tenants. In many limits a value of 0 means unlimited so the method will return 0 only if all inputs have a limit of 0 or an empty tenant list is given.
func SmallestPositiveNonZeroIntPerTenant ¶
SmallestPositiveNonZeroIntPerTenant is returning the minimal positive and non-zero value of the supplied limit function for all given tenants. In many limits a value of 0 means unlimited so the method will return 0 only if all inputs have a limit of 0 or an empty tenant list is given.
Types ¶
type BlockedQuery ¶
type BlockedQuery struct { Pattern string `yaml:"pattern"` Regex bool `yaml:"regex"` Hash uint32 `yaml:"hash"` Types flagext.StringSliceCSV `yaml:"types"` }
type NotificationRateLimitMap ¶
func (NotificationRateLimitMap) MarshalYAML ¶
func (m NotificationRateLimitMap) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (NotificationRateLimitMap) Set ¶
func (m NotificationRateLimitMap) Set(s string) error
Set implements flag.Value
func (NotificationRateLimitMap) String ¶
func (m NotificationRateLimitMap) String() string
String implements flag.Value
func (NotificationRateLimitMap) UnmarshalYAML ¶
func (m NotificationRateLimitMap) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.