-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprom.go
More file actions
75 lines (66 loc) · 1.83 KB
/
Copy pathprom.go
File metadata and controls
75 lines (66 loc) · 1.83 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
//nolint: revive
EventsProcessedOk = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "deptracker_events_processed_ok",
Help: "The total number of successful events",
},
[]string{"event_type"},
)
//nolint: revive
EventsProcessedFailed = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "deptracker_events_processed_failed",
Help: "The total number of failed events",
},
[]string{"event_type"},
)
//nolint: revive
EventsProcessedTimer = promauto.NewHistogramVec(
prometheus.HistogramOpts{
Name: "deptracker_events_processed_timer",
Help: "The duration (seconds) for processing k8s events",
},
[]string{"status"},
)
//nolint: revive
PostDeploymentRecordTimer = promauto.NewHistogram(
prometheus.HistogramOpts{
Name: "deptracker_post_deployment_record_timer",
Help: "The duration (seconds) for posting data to the GitHub API",
},
)
//nolint: revive
PostDeploymentRecordOk = promauto.NewCounter(
prometheus.CounterOpts{
Name: "deptracker_post_record_ok",
Help: "The total number of successful posts",
},
)
//nolint: revive
PostDeploymentRecordSoftFail = promauto.NewCounter(
prometheus.CounterOpts{
Name: "deptracker_post_record_soft_fail",
Help: "The total number of soft (recoverable) post failures",
},
)
//nolint: revive
PostDeploymentRecordHardFail = promauto.NewCounter(
prometheus.CounterOpts{
Name: "deptracker_post_record_hard_fail",
Help: "The total number of hard post failures",
},
)
//nolint: revive
PostDeploymentRecordClientError = promauto.NewCounter(
prometheus.CounterOpts{
Name: "deptracker_post_record_client_error",
Help: "The total number of non-retryable client failures",
},
)
)