2020-12-02 10:09:37 -05:00
|
|
|
package objectstore
|
|
|
|
|
2020-12-08 22:09:24 -05:00
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
|
|
)
|
2020-12-02 10:09:37 -05:00
|
|
|
|
|
|
|
var (
|
2020-12-08 22:09:24 -05:00
|
|
|
objectStorageUploadRequests = promauto.NewCounterVec(
|
2020-12-02 10:09:37 -05:00
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "gitlab_workhorse_object_storage_upload_requests",
|
|
|
|
Help: "How many object storage requests have been processed",
|
|
|
|
},
|
|
|
|
[]string{"status"},
|
|
|
|
)
|
2020-12-08 22:09:24 -05:00
|
|
|
objectStorageUploadsOpen = promauto.NewGauge(
|
2020-12-02 10:09:37 -05:00
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Name: "gitlab_workhorse_object_storage_upload_open",
|
|
|
|
Help: "Describes many object storage requests are open now",
|
|
|
|
},
|
|
|
|
)
|
2020-12-08 22:09:24 -05:00
|
|
|
objectStorageUploadBytes = promauto.NewCounter(
|
2020-12-02 10:09:37 -05:00
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "gitlab_workhorse_object_storage_upload_bytes",
|
|
|
|
Help: "How many bytes were sent to object storage",
|
|
|
|
},
|
|
|
|
)
|
2020-12-08 22:09:24 -05:00
|
|
|
objectStorageUploadTime = promauto.NewHistogram(
|
2020-12-02 10:09:37 -05:00
|
|
|
prometheus.HistogramOpts{
|
|
|
|
Name: "gitlab_workhorse_object_storage_upload_time",
|
|
|
|
Help: "How long it took to upload objects",
|
|
|
|
Buckets: objectStorageUploadTimeBuckets,
|
|
|
|
})
|
|
|
|
|
|
|
|
objectStorageUploadRequestsRequestFailed = objectStorageUploadRequests.WithLabelValues("request-failed")
|
|
|
|
objectStorageUploadRequestsInvalidStatus = objectStorageUploadRequests.WithLabelValues("invalid-status")
|
|
|
|
|
|
|
|
objectStorageUploadTimeBuckets = []float64{.1, .25, .5, 1, 2.5, 5, 10, 25, 50, 100}
|
|
|
|
)
|