Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Ring RingConfig `yaml:"ring"` EnabledMetrics flagext.StringSliceCSV `yaml:"enabled_metrics"` // This allows downstream projects to define their own metrics and expose them via the exporter. // Donwstream projects should be responsible for enabling/disabling their own metrics, // so these won't be checked against EnabledMetrics. ExtraMetrics []ExportedMetric `yaml:"-"` }
Config holds the configuration for an overrides-exporter
func (*Config) RegisterFlags ¶
RegisterFlags configs this instance to the given FlagSet
type ExportedMetric ¶
type ExportedMetric struct { Name string Get func(limits *validation.Limits) float64 }
type OverridesExporter ¶
OverridesExporter exposes per-tenant resource limit overrides as Prometheus metrics
func NewOverridesExporter ¶
func NewOverridesExporter( config Config, defaultLimits *validation.Limits, tenantLimits validation.TenantLimits, log log.Logger, registerer prometheus.Registerer, ) (*OverridesExporter, error)
NewOverridesExporter creates an OverridesExporter that reads updates to per-tenant limits using the provided function.
func (*OverridesExporter) Collect ¶
func (oe *OverridesExporter) Collect(ch chan<- prometheus.Metric)
func (*OverridesExporter) Describe ¶
func (oe *OverridesExporter) Describe(ch chan<- *prometheus.Desc)
func (*OverridesExporter) RingHandler ¶
func (oe *OverridesExporter) RingHandler(w http.ResponseWriter, req *http.Request)
RingHandler is a http.Handler that serves requests for the overrides-exporter ring status page
type RingConfig ¶
type RingConfig struct { // Whether the ring is enabled for overrides-exporters. Enabled bool `yaml:"enabled"` // Use common config shared with other components' ring config. Common util.CommonRingConfig `yaml:",inline"` // Ring stability (used to decrease token reshuffling on scale-up). WaitStabilityMinDuration time.Duration `yaml:"wait_stability_min_duration" category:"advanced"` WaitStabilityMaxDuration time.Duration `yaml:"wait_stability_max_duration" category:"advanced"` }
RingConfig holds the configuration for the overrides-exporter ring.
func (*RingConfig) RegisterFlags ¶
func (c *RingConfig) RegisterFlags(f *flag.FlagSet, logger log.Logger)
RegisterFlags configures this RingConfig to the given flag set and sets defaults.
Click to show internal directories.
Click to hide internal directories.