pgbus 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +56 -3
- data/app/controllers/pgbus/dead_letter_controller.rb +5 -1
- data/app/helpers/pgbus/application_helper.rb +8 -6
- data/app/views/pgbus/dashboard/_recent_failures.html.erb +1 -1
- data/app/views/pgbus/dashboard/_stats_cards.html.erb +1 -0
- data/app/views/pgbus/dead_letter/_messages_table.html.erb +33 -1
- data/app/views/pgbus/insights/show.html.erb +1 -1
- data/app/views/pgbus/jobs/_failed_table.html.erb +1 -1
- data/app/views/pgbus/jobs/show.html.erb +1 -1
- data/app/views/pgbus/queues/show.html.erb +3 -0
- data/config/locales/da.yml +7 -0
- data/config/locales/de.yml +7 -0
- data/config/locales/en.yml +7 -0
- data/config/locales/es.yml +7 -0
- data/config/locales/fi.yml +7 -0
- data/config/locales/fr.yml +7 -0
- data/config/locales/it.yml +7 -0
- data/config/locales/ja.yml +7 -0
- data/config/locales/nb.yml +7 -0
- data/config/locales/nl.yml +7 -0
- data/config/locales/pt.yml +7 -0
- data/config/locales/sv.yml +7 -0
- data/lib/pgbus/configuration.rb +5 -2
- data/lib/pgbus/integrations/appsignal/dashboard.json +353 -0
- data/lib/pgbus/integrations/appsignal/dashboards/pgbus_health.json +224 -85
- data/lib/pgbus/integrations/appsignal/dashboards/pgbus_streams.json +154 -63
- data/lib/pgbus/integrations/appsignal/dashboards/pgbus_throughput.json +218 -79
- data/lib/pgbus/integrations/appsignal/probe.rb +17 -2
- data/lib/pgbus/integrations/appsignal.rb +17 -0
- data/lib/pgbus/version.rb +1 -1
- data/lib/pgbus/web/data_source.rb +21 -0
- data/lib/pgbus/web/payload_filter.rb +68 -0
- metadata +3 -1
|
@@ -1,87 +1,226 @@
|
|
|
1
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
|
-
|
|
2
|
+
"metric_keys": [
|
|
3
|
+
"pgbus_queue_depth"
|
|
4
|
+
],
|
|
5
|
+
"dashboard": {
|
|
6
|
+
"title": "Pgbus — Health",
|
|
7
|
+
"description": "Backlog, dead-letter activity, dead-tuple growth, and MVCC horizon.\nThe 'should I page someone?' dashboard.\n",
|
|
8
|
+
"visuals": [
|
|
9
|
+
{
|
|
10
|
+
"type": "timeseries",
|
|
11
|
+
"display": "LINE",
|
|
12
|
+
"title": "Queue depth (visible vs total)",
|
|
13
|
+
"description": "Visible depth excludes messages whose VT hasn't expired. A divergence between the two means workers are slow but the queue isn't growing.",
|
|
14
|
+
"line_label": "%name% - %queue%",
|
|
15
|
+
"format": "number",
|
|
16
|
+
"draw_null_as_zero": true,
|
|
17
|
+
"metrics": [
|
|
18
|
+
{
|
|
19
|
+
"name": "pgbus_queue_depth",
|
|
20
|
+
"fields": [
|
|
21
|
+
{
|
|
22
|
+
"field": "GAUGE"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"tags": [
|
|
26
|
+
{
|
|
27
|
+
"key": "queue",
|
|
28
|
+
"value": "*"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "pgbus_queue_visible_depth",
|
|
34
|
+
"fields": [
|
|
35
|
+
{
|
|
36
|
+
"field": "GAUGE"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"tags": [
|
|
40
|
+
{
|
|
41
|
+
"key": "queue",
|
|
42
|
+
"value": "*"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "timeseries",
|
|
50
|
+
"display": "LINE",
|
|
51
|
+
"title": "Queue latency",
|
|
52
|
+
"description": "Age of the oldest message per queue (milliseconds). High latency means consumers can't keep up.",
|
|
53
|
+
"line_label": "%queue%",
|
|
54
|
+
"format": "duration",
|
|
55
|
+
"draw_null_as_zero": true,
|
|
56
|
+
"metrics": [
|
|
57
|
+
{
|
|
58
|
+
"name": "pgbus_queue_latency",
|
|
59
|
+
"fields": [
|
|
60
|
+
{
|
|
61
|
+
"field": "GAUGE"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"tags": [
|
|
65
|
+
{
|
|
66
|
+
"key": "queue",
|
|
67
|
+
"value": "*"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "timeseries",
|
|
75
|
+
"display": "LINE",
|
|
76
|
+
"title": "DLQ depth + failed events",
|
|
77
|
+
"description": "Messages that exceeded max_retries plus the failed-events table. Spikes after a deploy point at a regression.",
|
|
78
|
+
"line_label": "%name%",
|
|
79
|
+
"format": "number",
|
|
80
|
+
"draw_null_as_zero": true,
|
|
81
|
+
"metrics": [
|
|
82
|
+
{
|
|
83
|
+
"name": "pgbus_dlq_depth",
|
|
84
|
+
"fields": [
|
|
85
|
+
{
|
|
86
|
+
"field": "GAUGE"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"tags": []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "pgbus_failed_events_total",
|
|
93
|
+
"fields": [
|
|
94
|
+
{
|
|
95
|
+
"field": "GAUGE"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"tags": []
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "timeseries",
|
|
104
|
+
"display": "LINE",
|
|
105
|
+
"title": "Dead-lettered jobs per minute",
|
|
106
|
+
"line_label": "%queue% - %job_class%",
|
|
107
|
+
"format": "number",
|
|
108
|
+
"draw_null_as_zero": true,
|
|
109
|
+
"metrics": [
|
|
110
|
+
{
|
|
111
|
+
"name": "pgbus_queue_job_count",
|
|
112
|
+
"fields": [
|
|
113
|
+
{
|
|
114
|
+
"field": "COUNTER"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"tags": [
|
|
118
|
+
{
|
|
119
|
+
"key": "status",
|
|
120
|
+
"value": "dead_lettered"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"key": "queue",
|
|
124
|
+
"value": "*"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"key": "job_class",
|
|
128
|
+
"value": "*"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "timeseries",
|
|
136
|
+
"display": "LINE",
|
|
137
|
+
"title": "Active processes",
|
|
138
|
+
"description": "Workers + dispatcher + scheduler currently heartbeating, scoped per host.",
|
|
139
|
+
"line_label": "%hostname%",
|
|
140
|
+
"format": "number",
|
|
141
|
+
"draw_null_as_zero": true,
|
|
142
|
+
"metrics": [
|
|
143
|
+
{
|
|
144
|
+
"name": "pgbus_active_processes",
|
|
145
|
+
"fields": [
|
|
146
|
+
{
|
|
147
|
+
"field": "GAUGE"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"tags": [
|
|
151
|
+
{
|
|
152
|
+
"key": "hostname",
|
|
153
|
+
"value": "*"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "timeseries",
|
|
161
|
+
"display": "LINE",
|
|
162
|
+
"title": "Dead tuples in queue/archive tables",
|
|
163
|
+
"description": "If autovacuum can't keep up the index gets bloated and lock acquisition slows. Tune autovacuum_vacuum_scale_factor on the offending tables when this climbs.",
|
|
164
|
+
"line_label": "Dead tuples",
|
|
165
|
+
"format": "number",
|
|
166
|
+
"draw_null_as_zero": true,
|
|
167
|
+
"metrics": [
|
|
168
|
+
{
|
|
169
|
+
"name": "pgbus_total_dead_tuples",
|
|
170
|
+
"fields": [
|
|
171
|
+
{
|
|
172
|
+
"field": "GAUGE"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"tags": []
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "timeseries",
|
|
181
|
+
"display": "LINE",
|
|
182
|
+
"title": "Oldest open transaction (seconds)",
|
|
183
|
+
"description": "MVCC horizon pin. Long-running transactions prevent VACUUM from cleaning the dead tuples above. Anything over 60s is a smell.",
|
|
184
|
+
"line_label": "Oldest transaction",
|
|
185
|
+
"format": "duration",
|
|
186
|
+
"draw_null_as_zero": true,
|
|
187
|
+
"metrics": [
|
|
188
|
+
{
|
|
189
|
+
"name": "pgbus_oldest_transaction_age_seconds",
|
|
190
|
+
"fields": [
|
|
191
|
+
{
|
|
192
|
+
"field": "GAUGE"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"tags": []
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "timeseries",
|
|
201
|
+
"display": "LINE",
|
|
202
|
+
"title": "Worker recycles per minute",
|
|
203
|
+
"description": "Recycles by reason. Steady max_jobs is healthy; spiking max_memory means you have a leak.",
|
|
204
|
+
"line_label": "%reason%",
|
|
205
|
+
"format": "number",
|
|
206
|
+
"draw_null_as_zero": true,
|
|
207
|
+
"metrics": [
|
|
208
|
+
{
|
|
209
|
+
"name": "pgbus_worker_recycled",
|
|
210
|
+
"fields": [
|
|
211
|
+
{
|
|
212
|
+
"field": "COUNTER"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"tags": [
|
|
216
|
+
{
|
|
217
|
+
"key": "reason",
|
|
218
|
+
"value": "*"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
87
226
|
}
|
|
@@ -1,65 +1,156 @@
|
|
|
1
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
|
-
|
|
2
|
+
"metric_keys": [
|
|
3
|
+
"pgbus_stream_broadcast_count"
|
|
4
|
+
],
|
|
5
|
+
"dashboard": {
|
|
6
|
+
"title": "Pgbus — Streams",
|
|
7
|
+
"description": "Real-time SSE pub/sub. Broadcasts, fanout, active connections,\nand the outbox/recurring scheduler.\n",
|
|
8
|
+
"visuals": [
|
|
9
|
+
{
|
|
10
|
+
"type": "timeseries",
|
|
11
|
+
"display": "LINE",
|
|
12
|
+
"title": "Stream broadcasts per minute",
|
|
13
|
+
"line_label": "%stream% - %deferred%",
|
|
14
|
+
"format": "number",
|
|
15
|
+
"draw_null_as_zero": true,
|
|
16
|
+
"metrics": [
|
|
17
|
+
{
|
|
18
|
+
"name": "pgbus_stream_broadcast_count",
|
|
19
|
+
"fields": [
|
|
20
|
+
{
|
|
21
|
+
"field": "COUNTER"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"tags": [
|
|
25
|
+
{
|
|
26
|
+
"key": "stream",
|
|
27
|
+
"value": "*"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "deferred",
|
|
31
|
+
"value": "*"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "timeseries",
|
|
39
|
+
"display": "LINE",
|
|
40
|
+
"title": "Active SSE connections",
|
|
41
|
+
"description": "Estimated from connect/disconnect events in the last 60 minutes.",
|
|
42
|
+
"line_label": "Active connections",
|
|
43
|
+
"format": "number",
|
|
44
|
+
"draw_null_as_zero": true,
|
|
45
|
+
"metrics": [
|
|
46
|
+
{
|
|
47
|
+
"name": "pgbus_stream_active_connections",
|
|
48
|
+
"fields": [
|
|
49
|
+
{
|
|
50
|
+
"field": "GAUGE"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"tags": []
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "timeseries",
|
|
59
|
+
"display": "LINE",
|
|
60
|
+
"title": "Average fanout per broadcast",
|
|
61
|
+
"description": "Mean number of connections that received each broadcast over the last hour.",
|
|
62
|
+
"line_label": "Avg fanout",
|
|
63
|
+
"format": "number",
|
|
64
|
+
"draw_null_as_zero": false,
|
|
65
|
+
"metrics": [
|
|
66
|
+
{
|
|
67
|
+
"name": "pgbus_stream_avg_fanout",
|
|
68
|
+
"fields": [
|
|
69
|
+
{
|
|
70
|
+
"field": "GAUGE"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"tags": []
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "timeseries",
|
|
79
|
+
"display": "LINE",
|
|
80
|
+
"title": "Broadcast payload size (bytes)",
|
|
81
|
+
"description": "Distribution of payload bytes. Use to spot accidentally-streaming-an-entire-page bugs.",
|
|
82
|
+
"line_label": "%stream%",
|
|
83
|
+
"format": "size",
|
|
84
|
+
"format_input": "byte",
|
|
85
|
+
"draw_null_as_zero": false,
|
|
86
|
+
"metrics": [
|
|
87
|
+
{
|
|
88
|
+
"name": "pgbus_stream_broadcast_bytes",
|
|
89
|
+
"fields": [
|
|
90
|
+
{
|
|
91
|
+
"field": "MEAN"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"field": "P95"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"tags": [
|
|
98
|
+
{
|
|
99
|
+
"key": "stream",
|
|
100
|
+
"value": "*"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "timeseries",
|
|
108
|
+
"display": "LINE",
|
|
109
|
+
"title": "Outbox publishes per minute",
|
|
110
|
+
"line_label": "%kind%",
|
|
111
|
+
"format": "number",
|
|
112
|
+
"draw_null_as_zero": true,
|
|
113
|
+
"metrics": [
|
|
114
|
+
{
|
|
115
|
+
"name": "pgbus_outbox_published",
|
|
116
|
+
"fields": [
|
|
117
|
+
{
|
|
118
|
+
"field": "COUNTER"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"tags": [
|
|
122
|
+
{
|
|
123
|
+
"key": "kind",
|
|
124
|
+
"value": "*"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "timeseries",
|
|
132
|
+
"display": "LINE",
|
|
133
|
+
"title": "Recurring tasks enqueued per minute",
|
|
134
|
+
"line_label": "%task%",
|
|
135
|
+
"format": "number",
|
|
136
|
+
"draw_null_as_zero": true,
|
|
137
|
+
"metrics": [
|
|
138
|
+
{
|
|
139
|
+
"name": "pgbus_recurring_enqueued",
|
|
140
|
+
"fields": [
|
|
141
|
+
{
|
|
142
|
+
"field": "COUNTER"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"tags": [
|
|
146
|
+
{
|
|
147
|
+
"key": "task",
|
|
148
|
+
"value": "*"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
65
156
|
}
|