Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SidecarSyncErrors is incremented each time any part of the sidecar sync loop fails. SidecarSyncErrors = prometheus.NewCounter(prometheus.CounterOpts{ Name: metricName("sidecar_sync_errors"), Help: "errors while any stage of sidecar sync mode", }) // SidecarVaultTokenErrors is incremented each time the sidecar sync loop either fails to // find a vault token, or there is an error validating it. SidecarVaultTokenErrors = prometheus.NewCounter(prometheus.CounterOpts{ Name: metricName("sidecar_vault_token_errors"), Help: "errors while fetching and validating vault token stage of sidecar sync", }) // SidecarSecretErrors is incremented each time the sidecar sync loop fails to sync any of // its secrets (i.e. secret, aws, ssh, etc...). SidecarSecretErrors = prometheus.NewCounter(prometheus.CounterOpts{ Name: metricName("sidecar_secret_errors"), Help: "errors while renewing secrets", }) )
Functions ¶
func MetricsHandler ¶
MetricsHandler instruments a prometheus metrics handler on "/metrics" and begins listening on the specified address.
Types ¶
type MetricName ¶
type MetricName string
const BriefcaseReset MetricName = "BriefcaseReset"
const SecretUpdates MetricName = "SecretUpdates"
const VaultTokenRefreshed MetricName = "VaultTokenRefreshed"
const VaultTokenWritten MetricName = "VaultTokenWritten"
type Metrics ¶
type Metrics struct { SidecarSyncErrors prometheus.Counter SidecarVaultTokenErrors prometheus.Counter SidecarSecretErrors prometheus.Counter // contains filtered or unexported fields }
func (*Metrics) Counter ¶
func (m *Metrics) Counter(name MetricName) int
func (*Metrics) Decrement ¶
func (m *Metrics) Decrement(name MetricName)
func (*Metrics) Increment ¶
func (m *Metrics) Increment(name MetricName)
func (*Metrics) IncrementBy ¶
func (m *Metrics) IncrementBy(name MetricName, val int)
Click to show internal directories.
Click to hide internal directories.