-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmetrics.go
40 lines (38 loc) · 960 Bytes
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
createSageBucketErrors = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "sage_bucket_creation_errors_total",
Help: "Number of errors during the sage bucket creation",
},
[]string{"error"},
)
bucketCounter = promauto.NewCounter(
prometheus.CounterOpts{
Name:"bucket_creation_total",
Help:"Number of sage bucket creations",
},
)
fileUploadCounter = promauto.NewCounter(
prometheus.CounterOpts{
Name:"file_upload_total",
Help:"Number of file uploads",
},
)
fileUploadByteSize = promauto.NewCounter(
prometheus.CounterOpts{
Name:"file_upload_byte_size_total",
Help:"the number of bytes uploaded",
},
)
fileDownloadByteSize = promauto.NewCounter(
prometheus.CounterOpts{
Name:"file_download_byte_size_total",
Help:"the number of bytes downloaded",
},
)
)