-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
prometheus.go
58 lines (47 loc) · 2.31 KB
/
prometheus.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package s4
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
promReportingPluginQuery = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "s4_reporting_plugin_query",
Help: "Metric to track number of ReportingPlugin.Query() calls",
}, []string{"product"})
promReportingPluginObservation = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "s4_reporting_plugin_observation",
Help: "Metric to track number of ReportingPlugin.Observation() calls",
}, []string{"product"})
promReportingPluginReport = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "s4_reporting_plugin_report",
Help: "Metric to track number of ReportingPlugin.Report() calls",
}, []string{"product"})
promReportingPluginShouldAccept = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "s4_reporting_plugin_accept",
Help: "Metric to track number of ReportingPlugin.ShouldAcceptFinalizedReport() calls",
}, []string{"product"})
promReportingPluginsQueryByteSize = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "s4_reporting_plugin_query_byte_size",
Help: "Metric to track query byte size returned by ReportingPlugin.Query()",
}, []string{"product"})
promReportingPluginsQueryRowsCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "s4_reporting_plugin_query_rows_count",
Help: "Metric to track rows count returned by ReportingPlugin.Query()",
}, []string{"product"})
promReportingPluginsObservationRowsCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "s4_reporting_plugin_observation_rows_count",
Help: "Metric to track rows count returned by ReportingPlugin.Observation()",
}, []string{"product"})
promReportingPluginsReportRowsCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "s4_reporting_plugin_report_rows_count",
Help: "Metric to track rows count returned by ReportingPlugin.Report()",
}, []string{"product"})
promReportingPluginWrongSigCount = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "s4_reporting_plugin_wrong_sig_count",
Help: "Metric to track number of rows having wrong signature",
}, []string{"product"})
promReportingPluginsExpiredRows = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "s4_reporting_plugin_expired_rows",
Help: "Metric to track number of expired rows",
}, []string{"product"})
)