// Package config provides common configuration structs shared among1// implementations of integrations.Integration.2package config34import (5"net/url"6"time"78"github.com/prometheus/prometheus/model/relabel"9)1011// Common is a set of common options shared by all integrations. It should be12// utilised by an integration's config by inlining the common options:13//14// type IntegrationConfig struct {15// Common config.Common `yaml:",inline"`16// }17type Common struct {18Enabled bool `yaml:"enabled,omitempty"`19InstanceKey *string `yaml:"instance,omitempty"`20ScrapeIntegration *bool `yaml:"scrape_integration,omitempty"`21ScrapeInterval time.Duration `yaml:"scrape_interval,omitempty"`22ScrapeTimeout time.Duration `yaml:"scrape_timeout,omitempty"`23RelabelConfigs []*relabel.Config `yaml:"relabel_configs,omitempty"`24MetricRelabelConfigs []*relabel.Config `yaml:"metric_relabel_configs,omitempty"`25WALTruncateFrequency time.Duration `yaml:"wal_truncate_frequency,omitempty"`26}2728// ScrapeConfig is a subset of options used by integrations to inform how samples29// should be scraped. It is utilized by the integrations.Manager to define a full30// Prometheus-compatible ScrapeConfig.31type ScrapeConfig struct {32// JobName should be a unique name indicating the collection of samples to be33// scraped. It will be prepended by "integrations/" when used by the integrations34// manager.35JobName string3637// MetricsPath is the path relative to the integration where metrics are exposed.38// It should match a route added to the router provided in Integration.RegisterRoutes.39// The path will be prepended by "/integrations/<integration name>" when read by40// the integrations manager.41MetricsPath string4243// QueryParams is a set of query parameters, that if set, will be appended to44// MetricsPath and used for scraping the integration's target.45QueryParams url.Values46}474849