forked from grafana/tempo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetrics.go
More file actions
53 lines (49 loc) · 1.59 KB
/
metrics.go
File metadata and controls
53 lines (49 loc) · 1.59 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
package localblocks
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
const (
namespace = "tempo"
subsystem = "metrics_generator_processor_local_blocks"
reasonLiveTracesExceeded = "live_traces_exceeded"
reasonTraceSizeExceeded = "trace_too_large"
)
var (
metricTotalTraces = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "traces_total",
Help: "Total number of traces created",
}, []string{"tenant"})
metricTotalSpans = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "spans_total",
Help: "Total number of spans after filtering",
}, []string{"tenant"})
metricDroppedSpans = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "spans_dropped_total",
Help: "Number of spans dropped",
}, []string{"tenant", "reason"})
metricLiveTraces = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "live_traces",
Help: "Number of live traces",
}, []string{"tenant"})
metricDroppedTraces = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "traces_dropped_total",
Help: "Number of traces dropped",
}, []string{"tenant", "reason"})
metricBlockSize = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "bytes",
Help: "Total size of local blocks",
}, []string{"tenant"})
)