github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/storage/stores/shipper/index/metrics.go (about)

     1  package index
     2  
     3  import (
     4  	"github.com/prometheus/client_golang/prometheus"
     5  	"github.com/prometheus/client_golang/prometheus/promauto"
     6  )
     7  
     8  type metrics struct {
     9  	openExistingFileFailuresTotal prometheus.Counter
    10  }
    11  
    12  func newMetrics(r prometheus.Registerer) *metrics {
    13  	return &metrics{
    14  		openExistingFileFailuresTotal: promauto.With(r).NewCounter(prometheus.CounterOpts{
    15  			Namespace: "loki_boltdb_shipper",
    16  			Name:      "open_existing_file_failures_total",
    17  			Help:      "Total number of failures in opening of existing files while loading active index tables during startup",
    18  		}),
    19  	}
    20  }