funktor 0.7.12 → 0.7.15

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.
@@ -67,3 +67,9 @@ queues:
67
67
  # https://zaccharles.medium.com/reproducing-the-sqs-trigger-and-lambda-concurrency-limit-issue-f4c09d384a18
68
68
  reservedConcurrency: 10
69
69
 
70
+ # Here you can specify a list of worker that you want to monitor closely
71
+ primaryWorkers:
72
+ - HelloWorker
73
+ - GreetingsWorker
74
+ - AuditWorker
75
+ - SingleThreadAuditWorker
@@ -141,6 +141,10 @@ module Funktor
141
141
 
142
142
  private
143
143
 
144
+ def primary_workers
145
+ funktor_config["primaryWorkers"] || app_worker_names
146
+ end
147
+
144
148
  def app_worker_names
145
149
  app_worker_files.map do |file|
146
150
  File.basename(file, ".rb").camelize
@@ -21,298 +21,46 @@ Resources:
21
21
  },
22
22
  <% current_y += 3 %>
23
23
 
24
- { <% "Processed Jobs By Worker" %>
25
- "height": 4,
26
- "width": 12,
27
- "y": <%= current_y %>,
28
- "x": 0,
29
- "type": "metric",
30
- "properties": {
31
- "metrics": [
32
- <%- app_worker_names.each do |worker_name| -%>
33
- [ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == app_worker_names.last ? "" : "," %>
34
- <%- end -%>
35
- ],
36
- "view": "timeSeries",
37
- "stacked": false,
38
- "region": "us-east-1",
39
- "title": "Processed Jobs By Worker",
40
- "period": 60,
41
- "stat": "Sum"
42
- }
43
- },
44
- { <% "p90 By Worker" %>
45
- "height": 4,
46
- "width": 12,
47
- "y": <%= current_y %>,
48
- "x": 12,
49
- "type": "metric",
50
- "properties": {
51
- "metrics": [
52
- <%- app_worker_names.each do |worker_name| -%>
53
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == app_worker_names.last ? "" : "," %>
54
- <%- end -%>
55
- ],
56
- "view": "timeSeries",
57
- "stacked": false,
58
- "region": "us-east-1",
59
- "stat": "p90",
60
- "period": 60,
61
- "title": "p90 by Worker"
62
- }
63
- },
64
- <% current_y += 3 %>
65
-
66
- { <% "Failed Jobs By Worker" %>
67
- "height": 4,
68
- "width": 12,
69
- "y": <%= current_y %>,
70
- "x": 0,
71
- "type": "metric",
72
- "properties": {
73
- "metrics": [
74
- <%- app_worker_names.each do |worker_name| -%>
75
- [ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == app_worker_names.last ? "" : "," %>
76
- <%- end -%>
77
- ],
78
- "view": "timeSeries",
79
- "stacked": false,
80
- "region": "us-east-1",
81
- "title": "Failed Jobs By Worker",
82
- "period": 60,
83
- "stat": "Sum"
84
- }
85
- },
86
- { <% "p50 By Worker" %>
87
- "height": 4,
88
- "width": 12,
89
- "y": <%= current_y %>,
90
- "x": 12,
91
- "type": "metric",
92
- "properties": {
93
- "metrics": [
94
- <%- app_worker_names.each do |worker_name| -%>
95
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ]<%= worker_name == app_worker_names.last ? "" : "," %>
96
- <%- end -%>
97
- ],
98
- "view": "timeSeries",
99
- "stacked": false,
100
- "region": "us-east-1",
101
- "stat": "p50",
102
- "period": 60,
103
- "title": "p50 by Worker"
104
- }
105
- },
106
- <% current_y += 3 %>
107
-
108
- { <% "Processed Jobs By Queue" %>
109
- "height": 4,
110
- "width": 12,
111
- "y": <%= current_y %>,
112
- "x": 0,
113
- "type": "metric",
114
- "properties": {
115
- "metrics": [
116
- <%- queue_names.each do |queue_name| -%>
117
- [ "${self:custom.funktor.DashboardNamespace}", "processed", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
118
- <%- end -%>
119
- ],
120
- "view": "timeSeries",
121
- "stacked": false,
122
- "region": "us-east-1",
123
- "title": "Processed Jobs By Queue",
124
- "period": 60,
125
- "stat": "Sum"
126
- }
127
- },
128
- { <% "p90 By Queue" %>
129
- "height": 4,
130
- "width": 12,
131
- "y": <%= current_y %>,
132
- "x": 12,
133
- "type": "metric",
134
- "properties": {
135
- "metrics": [
136
- <%- queue_names.each do |queue_name| -%>
137
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
138
- <%- end -%>
139
- ],
140
- "view": "timeSeries",
141
- "stacked": false,
142
- "region": "us-east-1",
143
- "stat": "p90",
144
- "period": 60,
145
- "title": "p90 by Queue"
146
- }
147
- },
148
-
149
- <% current_y += 3 %>
150
- { <% "Failed Jobs By Queue" %>
151
- "height": 4,
152
- "width": 12,
153
- "y": <%= current_y %>,
154
- "x": 0,
155
- "type": "metric",
156
- "properties": {
157
- "metrics": [
158
- <%- queue_names.each do |queue_name| -%>
159
- [ "${self:custom.funktor.DashboardNamespace}", "failed", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
160
- <%- end -%>
161
- ],
162
- "view": "timeSeries",
163
- "stacked": false,
164
- "region": "us-east-1",
165
- "title": "Failed Jobs By Queue",
166
- "period": 60,
167
- "stat": "Sum"
168
- }
169
- },
170
- { <% "p50 By Queue" %>
171
- "height": 4,
172
- "width": 12,
173
- "y": <%= current_y %>,
174
- "x": 12,
175
- "type": "metric",
176
- "properties": {
177
- "metrics": [
178
- <%- queue_names.each do |queue_name| -%>
179
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ]<%= queue_name == queue_names.last ? "" : "," %>
180
- <%- end -%>
181
- ],
182
- "view": "timeSeries",
183
- "stacked": false,
184
- "region": "us-east-1",
185
- "stat": "p50",
186
- "period": 60,
187
- "title": "p50 by Queue"
188
- }
189
- },
190
- <% current_y += 3 %>
191
-
192
- { <% "Jobs/Minute Section" %>
24
+ { <% "Primary Workers Overview" %>
193
25
  "height": 1,
194
26
  "width": 24,
195
27
  "y": <%= current_y %>,
196
28
  "x": 0,
197
29
  "type": "text",
198
30
  "properties": {
199
- "markdown": "\n# Jobs Per Minute By Worker\n"
31
+ "markdown": "\n# Primary Workers Overview \n"
200
32
  }
201
33
  },
202
34
  <% current_y += 1 %>
203
35
 
36
+ <%- primary_workers.each_with_index do |worker_name, index| -%>
37
+ <%- current_y += 9 if (index > 0 && (index % 6) == 0) %>
38
+ { <% "Worker Overview" %>
39
+ "height": 9,
40
+ "width": 4,
41
+ "y": <%= current_y %>,
42
+ "x": <%= (index % 6) * 4 %>,
43
+ "type": "metric",
44
+ "properties": {
45
+ "metrics": [
46
+ [ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>", { "color": "#2ca02c" } ],
47
+ [ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>", { "color": "#d62728" } ],
48
+ [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p90", "color": "#ff7f0e", "stat": "p90" } ],
49
+ [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p60", "color": "#1f77b4", "stat": "p60" } ]
50
+ ],
51
+ "view": "singleValue",
52
+ "region": "us-east-1",
53
+ "stat": "Sum",
54
+ "period": 60,
55
+ "sparkline": true,
56
+ "title": "<%= worker_name %>"
57
+ }
58
+ },
59
+ <%- end -%>
60
+ <%#- current_y += 9 if (primary_workers.count - 1) % 3 != 0 %>
61
+ <%- current_y += 9 %>
204
62
 
205
- <%- app_worker_names.each_with_index do |worker_name, index| -%>
206
- <%- current_y += 3 if (index > 0 && (index % 6) == 0) %>
207
- { <% "Processed Jobs By Worker" %>
208
- "height": 3,
209
- "width": 4,
210
- "y": <%= current_y %>,
211
- "x": <%= (index % 6) * 4 %>,
212
- "type": "metric",
213
- "properties": {
214
- "metrics": [
215
- [ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ]
216
- ],
217
- "view": "timeSeries",
218
- "stacked": false,
219
- "region": "us-east-1",
220
- "title": "<%= worker_name %> Jobs/Min",
221
- "period": 60,
222
- "stat": "Sum",
223
- "legend": {
224
- "position": "hidden"
225
- }
226
- }
227
- },
228
- <%- end -%>
229
- <%- current_y += 3 if (app_worker_names.count - 1) % 6 != 0 %>
230
-
231
-
232
- { <% "Failures/Minute Section" %>
233
- "height": 1,
234
- "width": 24,
235
- "y": <%= current_y %>,
236
- "x": 0,
237
- "type": "text",
238
- "properties": {
239
- "markdown": "\n# Failures Per Minute By Worker\n"
240
- }
241
- },
242
- <% current_y += 1 %>
243
-
244
-
245
- <%- app_worker_names.each_with_index do |worker_name, index| -%>
246
- <%- current_y += 3 if (index > 0 && (index % 6) == 0) %>
247
- { <% "Failed Jobs By Worker" %>
248
- "height": 3,
249
- "width": 4,
250
- "y": <%= current_y %>,
251
- "x": <%= (index % 6) * 4 %>,
252
- "type": "metric",
253
- "properties": {
254
- "metrics": [
255
- [ "${self:custom.funktor.DashboardNamespace}", "failed", "WorkerClassName", "<%= worker_name %>", { "color": "#d62728" } ]
256
- ],
257
- "view": "timeSeries",
258
- "stacked": false,
259
- "region": "us-east-1",
260
- "title": "<%= worker_name %> Fails/Min",
261
- "period": 60,
262
- "stat": "Sum",
263
- "legend": {
264
- "position": "hidden"
265
- }
266
- }
267
- },
268
- <%- end -%>
269
- <%- current_y += 3 if (app_worker_names.count - 1) % 6 != 0 %>
270
-
271
-
272
- { <% "Duration Percentiles Section" %>
273
- "height": 1,
274
- "width": 24,
275
- "y": <%= current_y %>,
276
- "x": 0,
277
- "type": "text",
278
- "properties": {
279
- "markdown": "\n# Duration Percentiles By Worker\n"
280
- }
281
- },
282
- <% current_y += 1 %>
283
-
284
-
285
- <%- app_worker_names.each_with_index do |worker_name, index| -%>
286
- <%- current_y += 4 if (index > 0 && (index % 6) == 0) %>
287
- { <% "Job Duration By Worker" %>
288
- "height": 4,
289
- "width": 4,
290
- "y": <%= current_y %>,
291
- "x": <%= (index % 6) * 4 %>,
292
- "type": "metric",
293
- "properties": {
294
- "metrics": [
295
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>", { "label": "p90", "stat": "p90", "color": "#d62728" } ],
296
- [ "...", { "label": "p80", "stat": "p80", "color": "#2ca02c" } ],
297
- [ "...", { "label": "p70", "stat": "p70", "color": "#ff7f0e" } ],
298
- [ "...", { "label": "p60", "color": "#1f77b4" } ]
299
- ],
300
- "view": "timeSeries",
301
- "stacked": false,
302
- "region": "us-east-1",
303
- "stat": "p60",
304
- "period": 60,
305
- "title": "<%= worker_name %> Duration Percentiles",
306
- "legend": {
307
- "position": "bottom"
308
- }
309
- }
310
- },
311
- <%- end -%>
312
- <%- current_y += 3 if (app_worker_names.count - 1) % 6 != 0 %>
313
-
314
-
315
- <%- app_worker_names.each do |worker_name| -%>
63
+ <%- primary_workers.each do |worker_name| -%>
316
64
  { <% "Worker" %>
317
65
  "height": 1,
318
66
  "width": 24,
@@ -585,98 +333,6 @@ Resources:
585
333
  <% current_y += 6 %>
586
334
  <%- end -%>
587
335
 
588
- { <% "Processed/Failed Jobs By Worker" %>
589
- "height": 6,
590
- "width": 12,
591
- "y": <%= current_y %>,
592
- "x": 0,
593
- "type": "metric",
594
- "properties": {
595
- "metrics": [
596
- <%- app_worker_names.each do |worker_name| -%>
597
- [ "${self:custom.funktor.DashboardNamespace}", "processed", "WorkerClassName", "<%= worker_name %>" ],
598
- [ ".", "failed", ".", "." ]<%= worker_name == app_worker_names.last ? "" : "," %>
599
- <%- end -%>
600
- ],
601
- "view": "timeSeries",
602
- "stacked": false,
603
- "region": "us-east-1",
604
- "title": "Process/Failed Jobs By Worker",
605
- "period": 60,
606
- "stat": "Sum"
607
- }
608
- },
609
-
610
- { <% "Job Duration By Worker" %>
611
- "height": 6,
612
- "width": 12,
613
- "y": <%= current_y %>,
614
- "x": 12,
615
- "type": "metric",
616
- "properties": {
617
- "metrics": [
618
- <%- app_worker_names.each do |worker_name| -%>
619
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "WorkerClassName", "<%= worker_name %>" ],
620
- [ "...", { "stat": "p99" } ]<%= worker_name == app_worker_names.last ? "" : "," %>
621
- <%- end -%>
622
- ],
623
- "view": "timeSeries",
624
- "stacked": false,
625
- "region": "us-east-1",
626
- "stat": "Average",
627
- "period": 60,
628
- "title": "Job Duration by Worker"
629
- }
630
- },
631
-
632
-
633
- <% current_y += 6 %>
634
-
635
- { <% "Job Duration By Queue" %>
636
- "height": 6,
637
- "width": 12,
638
- "y": <%= current_y %>,
639
- "x": 12,
640
- "type": "metric",
641
- "properties": {
642
- "metrics": [
643
- <%- queue_names.each do |queue_name| -%>
644
- [ "${self:custom.funktor.DashboardNamespace}", "Duration", "Queue", "<%= queue_name.underscore %>" ],
645
- [ "...", { "stat": "p99" } ]<%= queue_name == queue_names.last ? "" : "," %>
646
- <%- end -%>
647
- ],
648
- "view": "timeSeries",
649
- "stacked": false,
650
- "region": "us-east-1",
651
- "stat": "Average",
652
- "period": 60,
653
- "title": "Job Duration by Queue"
654
- }
655
- },
656
- { <% "Processed/Failed Jobs By Queue" %>
657
- "height": 6,
658
- "width": 12,
659
- "y": <%= current_y %>,
660
- "x": 0,
661
- "type": "metric",
662
- "properties": {
663
- "metrics": [
664
- <%- queue_names.each do |queue_name| -%>
665
- [ "${self:custom.funktor.DashboardNamespace}", "processed", "Queue", "<%= queue_name.underscore %>" ],
666
- [ ".", "failed", ".", "." ]<%= queue_name == queue_names.last ? "" : "," %>
667
- <%- end -%>
668
- ],
669
- "view": "timeSeries",
670
- "stacked": false,
671
- "region": "us-east-1",
672
- "title": "Process/Failed Jobs By Queue",
673
- "period": 60,
674
- "stat": "Sum"
675
- }
676
- },
677
-
678
-
679
- <% current_y += 3 %>
680
336
  { <% "Funktor Behind the Scenes Banner" %>
681
337
  "height": 3,
682
338
  "width": 24,
@@ -67,3 +67,7 @@ queues:
67
67
  # https://zaccharles.medium.com/reproducing-the-sqs-trigger-and-lambda-concurrency-limit-issue-f4c09d384a18
68
68
  reservedConcurrency: 10
69
69
 
70
+ # Here you can specify a list of worker that you want to monitor closely.
71
+ # If you don't specify a list we'll set up detailed monitoring for all workers.
72
+ #primaryWorkers:
73
+ #- HelloWorker
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.7.12"
2
+ VERSION = "0.7.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funktor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: 0.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green