metrics

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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"`
}

Jump to

Keyboard shortcuts

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