metrics

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics contains global structures related to metrics collection cert-manager exposes the following metrics: certificate_expiration_timestamp_seconds{name, namespace, issuer_name, issuer_kind, issuer_group} certificate_renewal_timestamp_seconds{name, namespace, issuer_name, issuer_kind, issuer_group} certificate_ready_status{name, namespace, condition, issuer_name, issuer_kind, issuer_group} certificate_challenge_status{status, domain, reason, processing, id, type} acme_client_request_count{"scheme", "host", "action", "method", "status"} acme_client_request_duration_seconds{"scheme", "host", "action", "method", "status"} venafi_client_request_duration_seconds{"scheme", "host", "path", "method", "status"} controller_sync_call_count{"controller"}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics is designed to be a shared object for updating the metrics exposed by cert-manager

func New

func New(log logr.Logger, c clock.Clock) *Metrics

New creates a Metrics struct and populates it with prometheus metric types.

func (*Metrics) ACMERequestCounter added in v1.19.0

func (m *Metrics) ACMERequestCounter() *prometheus.CounterVec

func (*Metrics) IncrementACMERequestCount added in v1.8.0

func (m *Metrics) IncrementACMERequestCount(labels ...string)

IncrementACMERequestCount increases the acme client request counter.

func (*Metrics) IncrementSyncCallCount added in v1.8.0

func (m *Metrics) IncrementSyncCallCount(controllerName string)

IncrementSyncCallCount will increase the sync counter for that controller.

func (*Metrics) IncrementSyncErrorCount added in v1.8.0

func (m *Metrics) IncrementSyncErrorCount(controllerName string)

IncrementSyncErrorCount will increase count of errors during sync of that controller.

func (*Metrics) NewServer added in v1.8.0

func (m *Metrics) NewServer(ln net.Listener) *http.Server

NewServer registers Prometheus metrics and returns a new Prometheus metrics HTTP server.

func (*Metrics) ObserveACMERequestDuration added in v1.8.0

func (m *Metrics) ObserveACMERequestDuration(duration time.Duration, labels ...string)

ObserveACMERequestDuration increases bucket counters for that ACME client duration.

func (*Metrics) ObserveVenafiRequestDuration added in v1.9.0

func (m *Metrics) ObserveVenafiRequestDuration(duration time.Duration, labels ...string)

ObserveVenafiRequestDuration increases bucket counters for that Venafi client duration.

func (*Metrics) SetupACMECollector added in v1.19.0

func (m *Metrics) SetupACMECollector(acmeInformers cmacmelisters.ChallengeLister)

func (*Metrics) SetupCertificateCollector added in v1.19.0

func (m *Metrics) SetupCertificateCollector(certLister cmlisters.CertificateLister)

Jump to

Keyboard shortcuts

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