-
Notifications
You must be signed in to change notification settings - Fork 3
/
analytics.go
128 lines (110 loc) · 2.97 KB
/
analytics.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package internal
import "github.com/prometheus/client_golang/prometheus"
var (
sandwichEventCount = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "sandwich_events_total",
Help: "Sandwich Events",
},
[]string{"identifier"},
)
sandwichEventInflightCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_events_inflight_count",
Help: "Count of dispatch events currently being processed",
},
)
sandwichEventBufferCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_events_buffer_count",
Help: "Count of events in message buffers",
},
)
sandwichDispatchEventCount = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "sandwich_dispatch_events_by_type_total",
Help: "Sandwich Dispatch Events",
},
[]string{"identifier", "type"},
)
sandwichGatewayLatency = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "sandwich_discord_gateway_latency",
Help: "Sandwich Discord Gateway Latency",
},
[]string{"identifier", "shard_group", "shard"},
)
sandwichUnavailableGuildCount = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "sandwich_unavailable_guilds_count",
Help: "Sandwich Unavailable Guilds",
},
[]string{"identifier", "shard_group"},
)
sandwichStateTotalCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_count",
Help: "Sandwich State Total Count",
},
)
sandwichStateGuildCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_guild_count",
Help: "Sandwich State Guild Count",
},
)
sandwichStateGuildMembersCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_member_count",
Help: "Sandwich State Guild Member Count",
},
)
sandwichStateRoleCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_role_count",
Help: "Sandwich State Guild Role Count",
},
)
sandwichStateEmojiCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_emoji_count",
Help: "Sandwich State Emoji Count",
},
)
sandwichStateUserCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_user_count",
Help: "Sandwich State User Count",
},
)
sandwichStateChannelCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_channel_count",
Help: "Sandwich State Channel Count",
},
)
sandwichStateVoiceStatesCount = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "sandwich_state_voice_states_count",
Help: "Sandwich State Voice States Count",
},
)
grpcCacheRequests = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "sandwich_grpc_requests_total",
Help: "Sandwich GRPC Requests",
},
)
grpcCacheHits = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "sandwich_grpc_cache_hits_total",
Help: "Sandwich GRPC Cache Hits",
},
)
grpcCacheMisses = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "sandwich_grpc_cache_misses_total",
Help: "Sandwich GRPC Cache Misses",
},
)
)