-
Notifications
You must be signed in to change notification settings - Fork 2
/
yabeda.rb
98 lines (77 loc) · 3.21 KB
/
yabeda.rb
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
# frozen_string_literal: true
Yabeda.configure do
# error_counter retry_counter sent_counter fetch_error_counter discarded_counter
group :outbox do
default_tag(:worker_version, 1)
counter :created_counter,
tags: %i[type name partition owner],
comment: "The total number of created messages"
counter :sent_counter,
tags: %i[type name partition owner],
comment: "The total number of processed messages"
counter :error_counter,
tags: %i[type name partition owner],
comment: "Errors (excepting retries) that occurred while processing messages"
counter :retry_counter,
tags: %i[type name partition owner],
comment: "Retries that occurred while processing messages"
counter :discarded_counter,
tags: %i[type name partition owner],
comment: "The total number of discarded messages"
counter :fetch_error_counter,
tags: %i[type name partition owner],
comment: "Errors that occurred while fetching messages"
gauge :last_stored_event_id,
tags: %i[type name partition owner],
comment: "The ID of the last stored event"
gauge :last_sent_event_id,
tags: %i[type name partition owner],
comment: "The ID of the last sent event. " \
"If the message order is not preserved, the value may be inaccurate"
histogram :process_latency,
tags: %i[type name partition owner],
unit: :seconds,
buckets: [0.5, 1, 2.5, 5, 10, 15, 20, 30, 45, 60, 300].freeze,
comment: "A histogram outbox process latency"
end
group :box_worker do
default_tag(:worker_version, 1)
default_tag(:worker_name, "worker")
counter :job_counter,
tags: %i[type name partition state owner],
comment: "The total number of processed jobs"
counter :job_timeout_counter,
tags: %i[type name partition_key],
comment: "Requeue of a job that occurred while processing the batch"
counter :job_items_counter,
tags: %i[type name partition],
comment: "The total number of processed items in jobs"
histogram :job_execution_runtime,
comment: "A histogram of the job execution time",
unit: :seconds,
tags: %i[type name partition],
buckets: [0.5, 1, 2.5, 5, 10, 15, 20, 30, 45, 60, 300]
histogram :item_execution_runtime,
comment: "A histogram of the item execution time",
unit: :seconds,
tags: %i[type name partition],
buckets: [0.5, 1, 2.5, 5, 10, 15, 20, 30, 45, 60, 300]
counter :batches_per_poll_counter,
tags: %i[type name partition],
comment: "The total number of poll batches per poll"
gauge :redis_job_queue_size,
tags: %i[type name partition],
comment: "The total size of redis job queue"
gauge :redis_job_queue_time_lag,
tags: %i[type name partition],
comment: "The total time lag of redis job queue"
counter :poll_throttling_counter,
tags: %i[type name partition throttler status],
comment: "The total number of poll throttlings"
histogram :poll_throttling_runtime,
comment: "A histogram of the poll throttling time",
unit: :seconds,
tags: %i[type name partition throttler],
buckets: [0.5, 1, 2.5, 5, 10, 15, 20, 30, 45, 60, 300]
end
end