exporter

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

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"`
}

Config holds the configuration for an overrides-exporter

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger)

RegisterFlags configs this instance to the given FlagSet

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration for an overrides-exporter.

type OverridesExporter

type OverridesExporter struct {
	services.Service
	// contains filtered or unexported fields
}

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 an http.Handler that serves requests for the overrides-exporter ring status page

type RingConfig

type RingConfig struct {
	Ring 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.

func (*RingConfig) ToRingConfig

func (cfg *RingConfig) ToRingConfig() ring.Config

func (*RingConfig) Validate

func (c *RingConfig) Validate() error

Validate the Config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL