infrastructure

package
v0.0.0-...-ac967b2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IncRequestCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "grpc_requests_total",
			Help: "Total number of gRPC requests",
		},
		[]string{"method"},
	)

	IncResponseCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "grpc_responses_total",
			Help: "Total number of gRPC responses",
		},
		[]string{"method", "status"},
	)

	HistRequestDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "request_duration_seconds",
			Help:    "Request duration in seconds",
			Buckets: prometheus.ExponentialBuckets(0.0001, 2, 16),
		},
		[]string{"method", "status"},
	)
)

Functions

func InitMetrics

func InitMetrics()

Types

This section is empty.

Directories

Path Synopsis
repository
pg

Jump to

Keyboard shortcuts

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