package metrics

import "github.com/containerd/accelerated-container-image/pkg/metrics"

Index

Variables

var (
	Config ExporterConfig

	IsAlive = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "is_alive",
		Help: "Indicates whether overlaybd-snapshotter is running or not.",
	})
	GRPCErrCount = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "grpc_error_count",
		Help: "Error count of GRPC APIs.",
	}, []string{"function"})
	GRPCLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name:    "grpc_latency_seconds",
		Help:    "Latency of GRPC APIs.",
		Buckets: prometheus.ExponentialBuckets(0.0001, 2, 20),
	}, []string{"function"})
)

Functions

func Init

func Init()

Types

type ExporterConfig

type ExporterConfig struct {
	Enable    bool   `json:"enable"`
	UriPrefix string `json:"uriPrefix"`
	Port      int    `json:"port"`
}

Source Files

metrics.go

Version
v1.3.0 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
12 hours ago

Tools for package owners.