-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.go
58 lines (49 loc) · 2.06 KB
/
stats.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 orcsectiontrace
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
orcprometheus "github.com/steinarvk/orclib/module/orc-prometheus"
)
var (
metricNodesGenerated = promauto.NewCounter(prometheus.CounterOpts{
Namespace: "trace",
Name: "nodes_generated",
Help: "Number of section trace nodes generated",
})
metricExecutionsOfSectionTotal = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "trace",
Name: "section_executions",
Help: "Time (in seconds) spent inside section",
}, []string{"section", "ok"})
metricTimeSpentInSectionTotal = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "trace",
Name: "section_total_time",
Help: "Time (in seconds) spent inside section",
}, []string{"section", "ok"})
metricTimeSpentInSectionHistogram = promauto.NewHistogramVec(prometheus.HistogramOpts{
Namespace: "trace",
Name: "section_execution_time_histogram",
Help: "Time (in seconds) spent inside section for each execution",
Buckets: orcprometheus.DefTimeBuckets,
}, []string{"section", "ok"})
metricTotalTimeInAnySection = promauto.NewCounter(prometheus.CounterOpts{
Namespace: "trace",
Name: "any_section_total_time",
Help: "Time (in seconds) spent inside any section, including overhead",
})
metricOverheadTimeInAnySection = promauto.NewCounter(prometheus.CounterOpts{
Namespace: "trace",
Name: "any_section_overhead_time",
Help: "Time (in seconds) spent processing section tracing inside any section",
})
metricTraceRecordsReceivedByCollector = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "trace",
Name: "records_collector_received",
Help: "Number of records received by the collector",
}, []string{"phase", "fate"})
metricTraceRecordsReceivedByProcessor = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "trace",
Name: "records_processor_received",
Help: "Number of records received by the collector",
}, []string{"phase", "collectors"})
)