Documentation ¶
Index ¶
Constants ¶
View Source
const MetricCollectorNamePrometheus = "prometheus-collector"
View Source
const MetricCollectorNameShardingPrometheus = "sharding-prometheus-collector"
Variables ¶
This section is empty.
Functions ¶
func NewPrometheusCollector ¶
func NewPrometheusCollector(ctx context.Context, baseCtx *katalystbase.GenericContext, genericConf *metric.GenericMetricConfiguration, collectConf *metric.CollectorConfiguration, metricStore store.MetricStore, ) (collector.MetricCollector, error)
func NewPrometheusShadingCollector ¶
func NewPrometheusShadingCollector(ctx context.Context, baseCtx *katalystbase.GenericContext, conf *metric.CollectorConfiguration, metricStore store.MetricStore, ) (collector.MetricCollector, error)
Types ¶
type ScrapeManager ¶
type ScrapeManager struct { // lastScrapeSize is used to initialize the buffer size using historical length sync.Mutex // contains filtered or unexported fields }
ScrapeManager is responsible for scraping logic through http requests and each endpoint will have one manager instance for efficiency.
func NewScrapeManager ¶
func (*ScrapeManager) HandleMetric ¶
func (s *ScrapeManager) HandleMetric(f func(d []*data.MetricSeries, tags ...metrics.MetricTag) error)
HandleMetric handles the in-cached metric, clears those metric if handle successes keep them in memory otherwise
func (*ScrapeManager) Start ¶
func (s *ScrapeManager) Start(duration time.Duration)
func (*ScrapeManager) Stop ¶
func (s *ScrapeManager) Stop()
Click to show internal directories.
Click to hide internal directories.