Versions in this module Expand all Collapse all v0 v0.2.0 Oct 15, 2025 v0.1.0 Oct 14, 2025 Changes in this version + func HTTPMiddleware(namespace string) func(http.Handler) http.Handler + func Init(cfg MetricsConfig) error + func InitStandardMetrics(namespace string) error + func IsInitialized() bool + func Registry() *prometheus.Registry + func Shutdown(ctx context.Context) error + func StreamServerInterceptor(namespace string) grpc.StreamServerInterceptor + func UnaryServerInterceptor(namespace string) grpc.UnaryServerInterceptor + type Counter struct + func GetGRPCCallCount() *Counter + func GetHTTPRequestCount() *Counter + func NewCounter(opts CounterOpts) (*Counter, error) + func (c *Counter) Add(value float64, labelValues ...string) + func (c *Counter) Inc(labelValues ...string) + func (c *Counter) WithLabelValues(labelValues ...string) prometheus.Counter + type CounterOpts struct + Help string + Labels []string + Name string + Namespace string + Subsystem string + type Gauge struct + func NewGauge(opts GaugeOpts) (*Gauge, error) + func (g *Gauge) Add(value float64, labelValues ...string) + func (g *Gauge) Dec(labelValues ...string) + func (g *Gauge) Inc(labelValues ...string) + func (g *Gauge) Set(value float64, labelValues ...string) + func (g *Gauge) Sub(value float64, labelValues ...string) + func (g *Gauge) WithLabelValues(labelValues ...string) prometheus.Gauge + type GaugeOpts struct + Help string + Labels []string + Name string + Namespace string + Subsystem string + type Histogram struct + func GetGRPCCallDuration() *Histogram + func GetHTTPRequestDuration() *Histogram + func GetHTTPRequestSize() *Histogram + func GetHTTPResponseSize() *Histogram + func NewHistogram(opts HistogramOpts) (*Histogram, error) + func (h *Histogram) Observe(value float64, labelValues ...string) + func (h *Histogram) WithLabelValues(labelValues ...string) prometheus.Observer + type HistogramOpts struct + Buckets []float64 + Help string + Labels []string + Name string + Namespace string + Subsystem string + type MetricsConfig struct + Enabled bool + Namespace string + Path string + Port int + func DefaultMetricsConfig() MetricsConfig