Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/storage/stores/shipper/metrics.go

23 lines
743 B

package shipper
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/weaveworks/common/instrument"
)
type metrics struct {
// duration in seconds spent in serving request on index managed by BoltDB Shipper
requestDurationSeconds *prometheus.HistogramVec
}
func newMetrics(r prometheus.Registerer) *metrics {
return &metrics{
requestDurationSeconds: promauto.With(r).NewHistogramVec(prometheus.HistogramOpts{
Namespace: "loki_boltdb_shipper",
Name: "request_duration_seconds",
Help: "Time (in seconds) spent serving requests when using boltdb shipper",
Buckets: instrument.DefBuckets,
}, []string{"operation", "status_code"}),
}
}