metrics

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RemoteWriteTimeout  = 30 * time.Second
	RemoteFlushDeadline = time.Minute
)
View Source
const (
	ExportersRecheckInterval = 10 * time.Second
)

Variables

View Source
var ErrNotReady = errors.New("Scrape manager not ready")

Functions

This section is empty.

Types

type Credentials added in v1.2.0

type Credentials struct {
	Username string
	Password string
}

type CredentialsSecret added in v1.2.0

type CredentialsSecret struct {
	Namespace   string
	Name        string
	UsernameKey string
	PasswordKey string
}

type Logger

type Logger struct{}

func (Logger) Log

func (l Logger) Log(v ...interface{}) error

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(k8s *k8s.K8S) (*Metrics, error)

func (*Metrics) HttpHandler

func (ms *Metrics) HttpHandler() http.Handler

func (*Metrics) ListenConfigUpdates

func (ms *Metrics) ListenConfigUpdates(updates <-chan config.Config)

func (*Metrics) ListenPodEvents added in v1.2.0

func (ms *Metrics) ListenPodEvents(events <-chan k8s.PodEvent)

func (*Metrics) Start added in v1.2.0

func (ms *Metrics) Start() error

func (*Metrics) Stop added in v1.3.0

func (ms *Metrics) Stop()

type Target added in v1.2.0

type Target struct {
	Type              TargetType
	Addr              string
	Credentials       Credentials
	CredentialsSecret CredentialsSecret
	Params            map[string]string

	Description                  string
	DiscoveredFromPodAnnotations bool
	// contains filtered or unexported fields
}

func TargetFromConfig added in v1.2.0

func TargetFromConfig(i config.ApplicationInstrumentation) *Target

func TargetFromPod added in v1.2.0

func TargetFromPod(pod *k8s.Pod) *Target

func (*Target) Collect added in v1.2.0

func (t *Target) Collect(ch chan<- prometheus.Metric)

func (*Target) Describe added in v1.2.0

func (t *Target) Describe(ch chan<- *prometheus.Desc)

func (*Target) Equal added in v1.2.0

func (t *Target) Equal(other *Target) bool

func (*Target) IsExporterStarted added in v1.2.0

func (t *Target) IsExporterStarted() bool

func (*Target) Labels added in v1.2.0

func (t *Target) Labels() prometheus.Labels

func (*Target) StartExporter added in v1.2.0

func (t *Target) StartExporter(reg *prometheus.Registry, credentials Credentials, scrapeInterval, scrapeTimeout time.Duration, changeEmitter *emitter.ChangeEmitter, maxTablesPerDB int, trackSizes bool, excludeDatabases []string) error

func (*Target) StopExporter added in v1.2.0

func (t *Target) StopExporter(reg *prometheus.Registry)

func (*Target) String added in v1.2.0

func (t *Target) String() string

type TargetType added in v1.2.0

type TargetType string
const (
	TargetTypePostgres  TargetType = "postgres"
	TargetTypeMysql     TargetType = "mysql"
	TargetTypeRedis     TargetType = "redis"
	TargetTypeMongodb   TargetType = "mongodb"
	TargetTypeMemcached TargetType = "memcached"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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