metrics

package
v0.0.0-...-cdef871 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricsQueue is the name we use to queueSub to a queue with the metrics
	MetricsQueue = "metrics_queue"
)

Variables

View Source
var ErrNoCert = errors.New("account has not certificate")

ErrNoCert is returned by accountCertificateValidUntil if the account has no certificate

Functions

This section is empty.

Types

type EnvelopeStatCollector

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

EnvelopeStatCollector implements the prometheus.Collector interface

func NewEnvelopeStatCollector

func NewEnvelopeStatCollector(
	control *control.Client, log zerolog.Logger,
) *EnvelopeStatCollector

NewEnvelopeStatCollector creates a new EnvelopeStatCollector

func (*EnvelopeStatCollector) Collect

func (c *EnvelopeStatCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (EnvelopeStatCollector) Describe

func (c EnvelopeStatCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type LogStatCollector

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

LogStatCollector implements the prometheus.Collector interface

func NewLogStatCollector

func NewLogStatCollector(
	control *control.Client, log zerolog.Logger,
) *LogStatCollector

NewLogStatCollector creates a new LogStatCollector

func (*LogStatCollector) Collect

func (c *LogStatCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (LogStatCollector) Describe

func (c LogStatCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type Options

type Options struct {
	services.Options

	CertificateExpirationCheckInterval    time.Duration
	CertificateExpirationNotifyInterval   time.Duration
	CertificateExpirationWarningThreshold time.Duration
	CertificateExpirationErrorThreshold   time.Duration

	ServerCA []byte
	ClientCA []byte
	Hub      *sentry.Hub

	MetricsDelayHint time.Duration
}

Options is used to create a Service

func (Options) NewService

func (o Options) NewService() (*Service, error)

NewService returns a new Service

type Service

type Service struct {
	services.BaseService
	Opts Options
	// contains filtered or unexported fields
}

Service is the metrics service implementation The metrics service is responsible for keeping track of global metrics of the bus

func New

func New(options Options) (*Service, error)

New returns a new Service

func (*Service) Gatherer

func (s *Service) Gatherer() prometheus.Gatherer

Gatherer returns the prometheus registry

func (*Service) Shutdown

func (s *Service) Shutdown() error

Shutdown the service

func (*Service) Startup

func (s *Service) Startup() error

Startup ...

type SlowCollector

type SlowCollector struct {
	Collector prometheus.Collector
	// contains filtered or unexported fields
}

func NewSlowCollector

func NewSlowCollector(
	ctx context.Context, name string, c prometheus.Collector,
	delayHint time.Duration, log zerolog.Logger,
) *SlowCollector

func (*SlowCollector) Close

func (c *SlowCollector) Close()

func (*SlowCollector) Collect

func (c *SlowCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*SlowCollector) Describe

func (c *SlowCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type SummaryCollector

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

SummaryCollector implements the prometheus.Collector interface

func NewSummaryCollector

func NewSummaryCollector(
	control *control.Client, actors *tools.ActorCache, pipelines *tools.PipelineCache,
	log zerolog.Logger,
) *SummaryCollector

NewSummaryCollector creates a new SummaryCollector

func (*SummaryCollector) Collect

func (c *SummaryCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (SummaryCollector) Describe

func (c SummaryCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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