karafka-web 0.8.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +19 -19
- data/docker-compose.yml +1 -1
- data/lib/karafka/web/config.rb +6 -0
- data/lib/karafka/web/contracts/config.rb +1 -0
- data/lib/karafka/web/installer.rb +6 -2
- data/lib/karafka/web/management/actions/enable.rb +5 -0
- data/lib/karafka/web/management/actions/extend_boot_file.rb +3 -1
- data/lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_metrics.rb +38 -0
- data/lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_states.rb +22 -0
- data/lib/karafka/web/management/migrations/1706611396_rename_lag_total_to_lag_hybrid_in_metrics.rb +36 -0
- data/lib/karafka/web/management/migrations/1706611396_rename_lag_total_to_lag_hybrid_in_states.rb +21 -0
- data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +7 -9
- data/lib/karafka/web/processing/consumers/aggregators/state.rb +8 -9
- data/lib/karafka/web/processing/consumers/contracts/aggregated_stats.rb +1 -2
- data/lib/karafka/web/processing/consumers/contracts/topic_stats.rb +1 -2
- data/lib/karafka/web/tracking/consumers/contracts/subscription_group.rb +1 -1
- data/lib/karafka/web/tracking/consumers/listeners/booting.rb +34 -0
- data/lib/karafka/web/tracking/consumers/sampler.rb +8 -2
- data/lib/karafka/web/tracking/producers/listeners/booting.rb +24 -0
- data/lib/karafka/web/tracking/scheduler.rb +0 -5
- data/lib/karafka/web/ui/controllers/consumers.rb +1 -1
- data/lib/karafka/web/ui/helpers/application_helper.rb +2 -0
- data/lib/karafka/web/ui/models/metrics/charts/topics.rb +5 -5
- data/lib/karafka/web/ui/models/partition.rb +22 -0
- data/lib/karafka/web/ui/models/process.rb +10 -12
- data/lib/karafka/web/ui/pro/app.rb +4 -0
- data/lib/karafka/web/ui/pro/controllers/consumers.rb +10 -4
- data/lib/karafka/web/ui/pro/controllers/health.rb +12 -0
- data/lib/karafka/web/ui/pro/views/consumers/_consumer.erb +1 -1
- data/lib/karafka/web/ui/pro/views/consumers/_counters.erb +2 -2
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb +3 -3
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_subscription_group.erb +9 -3
- data/lib/karafka/web/ui/pro/views/consumers/index.erb +1 -1
- data/lib/karafka/web/ui/pro/views/consumers/subscriptions.erb +11 -11
- data/lib/karafka/web/ui/pro/views/dashboard/index.erb +3 -3
- data/lib/karafka/web/ui/pro/views/health/_breadcrumbs.erb +8 -0
- data/lib/karafka/web/ui/pro/views/health/_consumer_group_header.erb +14 -0
- data/lib/karafka/web/ui/pro/views/health/_partition.erb +1 -9
- data/lib/karafka/web/ui/pro/views/health/_partition_lags.erb +24 -0
- data/lib/karafka/web/ui/pro/views/health/_partition_offset.erb +1 -1
- data/lib/karafka/web/ui/pro/views/health/_tabs.erb +9 -0
- data/lib/karafka/web/ui/pro/views/health/changes.erb +3 -17
- data/lib/karafka/web/ui/pro/views/health/lags.erb +52 -0
- data/lib/karafka/web/ui/pro/views/health/offsets.erb +4 -17
- data/lib/karafka/web/ui/pro/views/health/overview.erb +4 -19
- data/lib/karafka/web/ui/views/consumers/_counters.erb +2 -2
- data/lib/karafka/web/ui/views/consumers/index.erb +1 -1
- data/lib/karafka/web/ui/views/dashboard/index.erb +3 -3
- data/lib/karafka/web/version.rb +1 -1
- data/lib/karafka/web.rb +2 -1
- data.tar.gz.sig +0 -0
- metadata +11 -2
- metadata.gz.sig +0 -0
@@ -6,6 +6,28 @@ module Karafka
|
|
6
6
|
module Models
|
7
7
|
# Single topic partition data representation model
|
8
8
|
class Partition < Lib::HashProxy
|
9
|
+
# @param args [Object] anything hash proxy accepts
|
10
|
+
def initialize(*args)
|
11
|
+
super
|
12
|
+
|
13
|
+
# We initialize those here because we want to have them stored in the internal has
|
14
|
+
# for sorting
|
15
|
+
lag_hybrid
|
16
|
+
lag_hybrid_d
|
17
|
+
end
|
18
|
+
|
19
|
+
# Because `lag_stored` is not available until first marking, we fallback to the lag
|
20
|
+
# value that may be behind but is always available until stored lag is available.
|
21
|
+
# @return [Integer] hybrid log value
|
22
|
+
def lag_hybrid
|
23
|
+
self[:lag_hybrid] ||= lag_stored.negative? ? lag : lag_stored
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [Integer] hybrid log delta
|
27
|
+
def lag_hybrid_d
|
28
|
+
self[:lag_hybrid_d] ||= lag_stored.negative? ? lag_d : lag_stored_d
|
29
|
+
end
|
30
|
+
|
9
31
|
# @return [Symbol] one of three states in which LSO can be in the correlation to given
|
10
32
|
# partition in the context of a consumer group.
|
11
33
|
#
|
@@ -41,26 +41,24 @@ module Karafka
|
|
41
41
|
.then { |jobs| Jobs.new(jobs) }
|
42
42
|
end
|
43
43
|
|
44
|
-
# @return [Integer] collective
|
45
|
-
def
|
44
|
+
# @return [Integer] collective hybrid lag on this process
|
45
|
+
def lag_hybrid
|
46
46
|
consumer_groups
|
47
47
|
.flat_map(&:subscription_groups)
|
48
48
|
.flat_map(&:topics)
|
49
49
|
.flat_map(&:partitions)
|
50
|
-
.map(&:
|
50
|
+
.map(&:lag_hybrid)
|
51
51
|
.delete_if(&:negative?)
|
52
52
|
.sum
|
53
53
|
end
|
54
54
|
|
55
|
-
# @return [
|
56
|
-
def
|
57
|
-
consumer_groups
|
58
|
-
|
59
|
-
|
60
|
-
.
|
61
|
-
|
62
|
-
.delete_if(&:negative?)
|
63
|
-
.sum
|
55
|
+
# @return [Boolean] true if there are any active subscriptions, otherwise false.
|
56
|
+
def subscribed?
|
57
|
+
return false if consumer_groups.empty?
|
58
|
+
|
59
|
+
consumer_groups.any? do |cg|
|
60
|
+
!cg.subscription_groups.empty?
|
61
|
+
end
|
64
62
|
end
|
65
63
|
|
66
64
|
# @return [Integer] number of partitions to which we are currently subscribed
|
@@ -19,11 +19,11 @@ module Karafka
|
|
19
19
|
# Controller for displaying consumers states and details about them
|
20
20
|
class Consumers < Ui::Controllers::Base
|
21
21
|
self.sortable_attributes = %w[
|
22
|
+
id
|
22
23
|
name
|
23
24
|
started_at
|
24
|
-
|
25
|
-
|
26
|
-
lag_stored_d
|
25
|
+
lag_hybrid
|
26
|
+
lag_hybrid_d
|
27
27
|
committed_offset
|
28
28
|
stored_offset
|
29
29
|
fetch_state
|
@@ -93,7 +93,13 @@ module Karafka
|
|
93
93
|
|
94
94
|
# We want to have sorting but on a per subscription group basis and not to sort
|
95
95
|
# everything
|
96
|
-
@process.consumer_groups.each
|
96
|
+
@process.consumer_groups.each do |consumer_group|
|
97
|
+
# We need to initialize the whole structure so dynamic fields are also built into
|
98
|
+
# the underlying hashes for sorting
|
99
|
+
consumer_group.subscription_groups.flat_map(&:topics).flat_map(&:partitions)
|
100
|
+
|
101
|
+
refine(consumer_group)
|
102
|
+
end
|
97
103
|
|
98
104
|
render
|
99
105
|
end
|
@@ -20,8 +20,12 @@ module Karafka
|
|
20
20
|
class Health < Ui::Controllers::Base
|
21
21
|
self.sortable_attributes = %w[
|
22
22
|
id
|
23
|
+
lag
|
24
|
+
lag_d
|
23
25
|
lag_stored
|
24
26
|
lag_stored_d
|
27
|
+
lag_hybrid
|
28
|
+
lag_hybrid_d
|
25
29
|
committed_offset
|
26
30
|
committed_offset_fd
|
27
31
|
stored_offset
|
@@ -50,6 +54,14 @@ module Karafka
|
|
50
54
|
render
|
51
55
|
end
|
52
56
|
|
57
|
+
# Displays details about lags and their progression/statuses
|
58
|
+
def lags
|
59
|
+
# Same data as overview but presented differently
|
60
|
+
overview
|
61
|
+
|
62
|
+
render
|
63
|
+
end
|
64
|
+
|
53
65
|
# Displays details about offsets and their progression/statuses
|
54
66
|
def offsets
|
55
67
|
# Same data as overview but presented differently
|
@@ -19,9 +19,9 @@
|
|
19
19
|
</li>
|
20
20
|
<li class="col-sm">
|
21
21
|
<div class="count mb-1">
|
22
|
-
<%= number_with_delimiter @counters.
|
22
|
+
<%= number_with_delimiter @counters.lag_hybrid, ' ' %>
|
23
23
|
</div>
|
24
|
-
<div class="desc">
|
24
|
+
<div class="desc">Total lag</div>
|
25
25
|
</li>
|
26
26
|
<li class="col-sm">
|
27
27
|
<a href="<%= root_path('jobs/running') %>">
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<%= partition.id %>
|
4
4
|
</td>
|
5
5
|
<td>
|
6
|
-
<%== lag_with_label partition.
|
6
|
+
<%== lag_with_label partition.lag_hybrid %>
|
7
7
|
</td>
|
8
8
|
<td>
|
9
|
-
<span class="badge <%= lag_trend_bg(partition.
|
10
|
-
<%= partition.
|
9
|
+
<span class="badge <%= lag_trend_bg(partition.lag_hybrid_d) %>">
|
10
|
+
<%= partition.lag_hybrid_d %>
|
11
11
|
</span>
|
12
12
|
</td>
|
13
13
|
<td>
|
@@ -76,7 +76,13 @@
|
|
76
76
|
|
77
77
|
<span class="text-end mt-3">
|
78
78
|
<small>
|
79
|
-
Last rebalance reason:
|
79
|
+
Last rebalance reason:
|
80
|
+
|
81
|
+
<% if subscription_group.rebalance_reason.empty? %>
|
82
|
+
Unknown
|
83
|
+
<% else %>
|
84
|
+
<%= subscription_group.rebalance_reason %>
|
85
|
+
<% end %>
|
80
86
|
</small>
|
81
87
|
</span>
|
82
88
|
</div>
|
@@ -104,8 +110,8 @@
|
|
104
110
|
<tr class="align-middle">
|
105
111
|
</tr>
|
106
112
|
<th><%== sort_link('Partition', :id) %></th>
|
107
|
-
<th><%== sort_link(:
|
108
|
-
<th><%== sort_link('Lag
|
113
|
+
<th><%== sort_link('Lag', :lag_hybrid) %></th>
|
114
|
+
<th><%== sort_link('Lag trend', :lag_hybrid_d) %></th>
|
109
115
|
<th><%== sort_link(:committed_offset) %></th>
|
110
116
|
<th><%== sort_link(:stored_offset) %></th>
|
111
117
|
<th><%== sort_link(:fetch_state) %></th>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<th class="col-sm-1">Memory</th>
|
18
18
|
<th class="col-sm-1">Performance</th>
|
19
19
|
<th class="col-sm-1">Load</th>
|
20
|
-
<th class="col-sm-1"><%== sort_link(:
|
20
|
+
<th class="col-sm-1"><%== sort_link('Lag', :lag_hybrid) %></th>
|
21
21
|
</tr>
|
22
22
|
</thead>
|
23
23
|
<tbody>
|
@@ -8,16 +8,16 @@
|
|
8
8
|
|
9
9
|
<%== partial 'consumers/consumer/tabs' %>
|
10
10
|
|
11
|
-
<% if @process.
|
11
|
+
<% if @process.subscribed? %>
|
12
|
+
<div class="container">
|
13
|
+
<%==
|
14
|
+
render_each(
|
15
|
+
@process.consumer_groups,
|
16
|
+
'consumers/consumer/_consumer_group',
|
17
|
+
local: :consumer_group
|
18
|
+
)
|
19
|
+
%>
|
20
|
+
</div>
|
21
|
+
<% else %>
|
12
22
|
<%== partial 'consumers/consumer/no_subscriptions' %>
|
13
23
|
<% end %>
|
14
|
-
|
15
|
-
<div class="container">
|
16
|
-
<%==
|
17
|
-
render_each(
|
18
|
-
@process.consumer_groups,
|
19
|
-
'consumers/consumer/_consumer_group',
|
20
|
-
local: :consumer_group
|
21
|
-
)
|
22
|
-
%>
|
23
|
-
</div>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<ul class="nav nav-tabs" id="graphs1" role="tablist">
|
14
14
|
<%== partial 'shared/tab_nav', locals: { title: 'Messages', id: 'messages', active: true } %>
|
15
15
|
<%== partial 'shared/tab_nav', locals: { title: 'Batches', id: 'batches' } %>
|
16
|
-
<%== partial 'shared/tab_nav', locals: { title: '
|
16
|
+
<%== partial 'shared/tab_nav', locals: { title: 'Topics lags', id: 'topics-lags' } %>
|
17
17
|
<%== partial 'shared/tab_nav', locals: { title: 'Topics pace', id: 'topics-pace' } %>
|
18
18
|
<%== partial 'shared/tab_nav', locals: { title: 'Max LSO time', id: 'max-lso-time' } %>
|
19
19
|
</ul>
|
@@ -29,8 +29,8 @@
|
|
29
29
|
<%== partial 'shared/chart', locals: { data: data, id: 'batches' } %>
|
30
30
|
</div>
|
31
31
|
|
32
|
-
<div class="tab-pane" id="lags
|
33
|
-
<%== partial 'shared/chart', locals: { data: @topics_charts.
|
32
|
+
<div class="tab-pane" id="topics-lags" role="tabpanel">
|
33
|
+
<%== partial 'shared/chart', locals: { data: @topics_charts.lags_hybrid, id: 'topics-lags' } %>
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div class="tab-pane" id="topics-pace" role="tabpanel">
|
@@ -4,6 +4,14 @@
|
|
4
4
|
</a>
|
5
5
|
</li>
|
6
6
|
|
7
|
+
<% if current_path.include?('/lags') %>
|
8
|
+
<li class="breadcrumb-item">
|
9
|
+
<a href="<%= root_path('health', 'lags') %>">
|
10
|
+
Lags
|
11
|
+
</a>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
|
7
15
|
<% if current_path.include?('/overview') %>
|
8
16
|
<li class="breadcrumb-item">
|
9
17
|
<a href="<%= root_path('health', 'overview') %>">
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="row mb-4">
|
2
|
+
<div class="col-sm-8">
|
3
|
+
<h4 class="mb-4"><%= cg_name %></h4>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="col-sm-4">
|
7
|
+
<span class="float-end">
|
8
|
+
Last rebalance:
|
9
|
+
<span class="badge bg-secondary">
|
10
|
+
<%== relative_time(details[:rebalanced_at]) %>
|
11
|
+
</span>
|
12
|
+
</span>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -3,15 +3,7 @@
|
|
3
3
|
<%= partition_id %>
|
4
4
|
</td>
|
5
5
|
<td>
|
6
|
-
<%== lag_with_label details.
|
7
|
-
</td>
|
8
|
-
<td>
|
9
|
-
<span class="badge <%= lag_trend_bg(details.lag_stored_d) %>">
|
10
|
-
<%= details.lag_stored_d %>
|
11
|
-
</span>
|
12
|
-
</td>
|
13
|
-
<td>
|
14
|
-
<%== offset_with_label topic_name, partition_id, details.committed_offset %>
|
6
|
+
<%== lag_with_label details.lag_hybrid %>
|
15
7
|
</td>
|
16
8
|
<td>
|
17
9
|
<%== offset_with_label topic_name, partition_id, details.stored_offset %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<tr class="align-middle <%= lso_risk_state_bg(details) %> status-row-<%= details.process.status %>">
|
2
|
+
<td>
|
3
|
+
<%= partition_id %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
<%== lag_with_label details.lag %>
|
7
|
+
</td>
|
8
|
+
<td>
|
9
|
+
<span class="badge <%= lag_trend_bg(details.lag_d) %>">
|
10
|
+
<%= details.lag_d %>
|
11
|
+
</span>
|
12
|
+
</td>
|
13
|
+
<td>
|
14
|
+
<%== lag_with_label details.lag_stored %>
|
15
|
+
</td>
|
16
|
+
<td>
|
17
|
+
<span class="badge <%= lag_trend_bg(details.lag_stored_d) %>">
|
18
|
+
<%= details.lag_stored_d %>
|
19
|
+
</span>
|
20
|
+
</td>
|
21
|
+
<td>
|
22
|
+
<%== poll_state_with_change_time_label(details.poll_state, details.poll_state_ch) %>
|
23
|
+
</td>
|
24
|
+
</tr>
|
@@ -12,6 +12,15 @@
|
|
12
12
|
</a>
|
13
13
|
</li>
|
14
14
|
|
15
|
+
<li class="nav-item">
|
16
|
+
<a
|
17
|
+
class="nav-link <%= nav_class(include: 'lags') %>"
|
18
|
+
href="<%= root_path('health', 'lags') %>"
|
19
|
+
>
|
20
|
+
Lags
|
21
|
+
</a>
|
22
|
+
</li>
|
23
|
+
|
15
24
|
<li class="nav-item">
|
16
25
|
<a
|
17
26
|
class="nav-link <%= nav_class(include: 'offsets') %>"
|
@@ -1,28 +1,14 @@
|
|
1
1
|
<%== view_title('Consumers groups changes details') %>
|
2
2
|
|
3
|
+
<%== partial 'health/tabs' %>
|
4
|
+
|
3
5
|
<% if @stats.empty? %>
|
4
6
|
<%== partial 'health/no_data' %>
|
5
|
-
<% else %>
|
6
|
-
<%== partial 'health/tabs' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
|
-
|
10
9
|
<% @stats.each_with_index do |(cg_name, details), index| %>
|
11
10
|
<div class="container mb-5">
|
12
|
-
|
13
|
-
<div class="col-sm-8">
|
14
|
-
<h4 class="mb-4"><%= cg_name %></h4>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="col-sm-4">
|
18
|
-
<span class="float-end">
|
19
|
-
Last rebalance:
|
20
|
-
<span class="badge bg-secondary">
|
21
|
-
<%== relative_time(details[:rebalanced_at]) %>
|
22
|
-
</span>
|
23
|
-
</span>
|
24
|
-
</div>
|
25
|
-
</div>
|
11
|
+
<%== partial 'health/consumer_group_header', locals: { cg_name: cg_name, details: details } %>
|
26
12
|
|
27
13
|
<div class="row mb-3">
|
28
14
|
<div class="col-sm-12">
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<%== view_title('Consumers groups lags details') %>
|
2
|
+
|
3
|
+
<%== partial 'health/tabs' %>
|
4
|
+
|
5
|
+
<% if @stats.empty? %>
|
6
|
+
<%== partial 'health/no_data' %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% @stats.each_with_index do |(cg_name, details), index| %>
|
10
|
+
<div class="container mb-5">
|
11
|
+
<%== partial 'health/consumer_group_header', locals: { cg_name: cg_name, details: details } %>
|
12
|
+
|
13
|
+
<div class="row mb-3">
|
14
|
+
<div class="col-sm-12">
|
15
|
+
<% topics = details[:topics] %>
|
16
|
+
<% topics.each_with_index do |(topic_name, partitions), index| %>
|
17
|
+
<table class="processes bg-white table table-hover table-bordered table-striped align-middle <%= (index+1 < topics.size) ? 'mb-5' : 'mb-3' %>">
|
18
|
+
<thead>
|
19
|
+
<tr class="align-middle">
|
20
|
+
<th colspan="12">
|
21
|
+
<h5 class="mb-0"><%= topic_name %></h4>
|
22
|
+
</th>
|
23
|
+
</tr>
|
24
|
+
<tr class="align-middle">
|
25
|
+
<th><%== sort_link('Partition', :id) %></th>
|
26
|
+
<th><%== sort_link('Lag', :lag) %></th>
|
27
|
+
<th><%== sort_link('Lag trend', :lag_d) %></th>
|
28
|
+
<th><%== sort_link('Lag stored', :lag_stored) %></th>
|
29
|
+
<th><%== sort_link('Lag stored trend', :lag_stored_d) %></th>
|
30
|
+
<th><%== sort_link(:poll_state) %></th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% partitions.each do |partition_id, details| %>
|
35
|
+
<%==
|
36
|
+
partial(
|
37
|
+
'health/partition_lags',
|
38
|
+
locals: {
|
39
|
+
topic_name: topic_name,
|
40
|
+
partition_id: partition_id,
|
41
|
+
details: details
|
42
|
+
}
|
43
|
+
)
|
44
|
+
%>
|
45
|
+
<% end %>
|
46
|
+
</tbody>
|
47
|
+
</table>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
@@ -1,27 +1,14 @@
|
|
1
1
|
<%== view_title('Consumers groups offsets details') %>
|
2
2
|
|
3
|
+
<%== partial 'health/tabs' %>
|
4
|
+
|
3
5
|
<% if @stats.empty? %>
|
4
6
|
<%== partial 'health/no_data' %>
|
5
|
-
<% else %>
|
6
|
-
<%== partial 'health/tabs' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% @stats.each_with_index do |(cg_name, details), index| %>
|
10
10
|
<div class="container mb-5">
|
11
|
-
|
12
|
-
<div class="col-sm-8">
|
13
|
-
<h4 class="mb-4"><%= cg_name %></h4>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<div class="col-sm-4">
|
17
|
-
<span class="float-end">
|
18
|
-
Last rebalance:
|
19
|
-
<span class="badge bg-secondary">
|
20
|
-
<%== relative_time(details[:rebalanced_at]) %>
|
21
|
-
</span>
|
22
|
-
</span>
|
23
|
-
</div>
|
24
|
-
</div>
|
11
|
+
<%== partial 'health/consumer_group_header', locals: { cg_name: cg_name, details: details } %>
|
25
12
|
|
26
13
|
<div class="row mb-3">
|
27
14
|
<div class="col-sm-12">
|
@@ -36,7 +23,7 @@
|
|
36
23
|
</tr>
|
37
24
|
<tr class="align-middle">
|
38
25
|
<th><%== sort_link('Partition', :id) %></th>
|
39
|
-
<th><%== sort_link(:
|
26
|
+
<th><%== sort_link('Lag', :lag_hybrid) %></th>
|
40
27
|
<th><%== sort_link(:committed_offset) %></th>
|
41
28
|
<th><%== sort_link('Committed offset change', :committed_offset_fd) %></th>
|
42
29
|
<th><%== sort_link(:stored_offset) %></th>
|
@@ -1,27 +1,14 @@
|
|
1
1
|
<%== view_title('Consumers groups overview') %>
|
2
2
|
|
3
|
+
<%== partial 'health/tabs' %>
|
4
|
+
|
3
5
|
<% if @stats.empty? %>
|
4
6
|
<%== partial 'health/no_data' %>
|
5
|
-
<% else %>
|
6
|
-
<%== partial 'health/tabs' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% @stats.each_with_index do |(cg_name, details), index| %>
|
10
10
|
<div class="container mb-5">
|
11
|
-
|
12
|
-
<div class="col-sm-8">
|
13
|
-
<h4 class="mb-4"><%= cg_name %></h4>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<div class="col-sm-4">
|
17
|
-
<span class="float-end">
|
18
|
-
Last rebalance:
|
19
|
-
<span class="badge bg-secondary">
|
20
|
-
<%== relative_time(details[:rebalanced_at]) %>
|
21
|
-
</span>
|
22
|
-
</span>
|
23
|
-
</div>
|
24
|
-
</div>
|
11
|
+
<%== partial 'health/consumer_group_header', locals: { cg_name: cg_name, details: details } %>
|
25
12
|
|
26
13
|
<div class="row mb-3">
|
27
14
|
<div class="col-sm-12">
|
@@ -36,9 +23,7 @@
|
|
36
23
|
</tr>
|
37
24
|
<tr class="align-middle">
|
38
25
|
<th><%== sort_link('Partition', :id) %></th>
|
39
|
-
<th><%== sort_link(:
|
40
|
-
<th><%== sort_link('Lag stored trend', :lag_stored_d) %></th>
|
41
|
-
<th><%== sort_link(:committed_offset) %></th>
|
26
|
+
<th><%== sort_link('Lag', :lag_hybrid) %></th>
|
42
27
|
<th><%== sort_link(:stored_offset) %></th>
|
43
28
|
<th><%== sort_link(:fetch_state) %></th>
|
44
29
|
<th><%== sort_link(:poll_state) %></th>
|
@@ -19,9 +19,9 @@
|
|
19
19
|
</li>
|
20
20
|
<li class="col-sm">
|
21
21
|
<div class="count mb-1">
|
22
|
-
<%= number_with_delimiter @counters.
|
22
|
+
<%= number_with_delimiter @counters.lag_hybrid, ' ' %>
|
23
23
|
</div>
|
24
|
-
<div class="desc">
|
24
|
+
<div class="desc">Total lag</div>
|
25
25
|
</li>
|
26
26
|
<li class="col-sm">
|
27
27
|
<a href="<%= root_path('jobs/running') %>">
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<th class="col-sm-2"><%== sort_link('Started', :started_at, rev: true) %></th>
|
17
17
|
<th class="col-sm-1">Memory</th>
|
18
18
|
<th class="col-sm-1">Utilization</th>
|
19
|
-
<th class="col-sm-1"><%== sort_link(:
|
19
|
+
<th class="col-sm-1"><%== sort_link('Lag', :lag_hybrid) %></th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
22
22
|
<tbody>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<ul class="nav nav-tabs" id="graphs1" role="tablist">
|
24
24
|
<%== partial 'shared/tab_nav', locals: { title: 'Messages', id: 'messages', active: true } %>
|
25
25
|
<%== partial 'shared/tab_nav', locals: { title: 'Batches', id: 'batches' } %>
|
26
|
-
<%== partial 'shared/tab_nav', locals: { title: 'Lags
|
26
|
+
<%== partial 'shared/tab_nav', locals: { title: 'Topics Lags', id: 'topics-lags' } %>
|
27
27
|
<%== partial 'shared/tab_nav', locals: { title: 'Topics pace', id: 'topics-pace' } %>
|
28
28
|
<%== partial 'shared/tab_nav', locals: { title: 'Max LSO time', id: 'max-lso-time' } %>
|
29
29
|
</ul>
|
@@ -39,10 +39,10 @@
|
|
39
39
|
<%== partial 'shared/chart', locals: { data: data, id: 'batches' } %>
|
40
40
|
</div>
|
41
41
|
|
42
|
-
<div class="tab-pane" id="lags
|
42
|
+
<div class="tab-pane" id="topics-lags" role="tabpanel">
|
43
43
|
<%== partial 'dashboard/feature_pro' %>
|
44
44
|
<% data = { enqueued: set.call, busy: set.call }.to_json %>
|
45
|
-
<%== partial 'shared/chart', locals: { data: data, id: 'lags
|
45
|
+
<%== partial 'shared/chart', locals: { data: data, id: 'topics-lags', blurred: true } %>
|
46
46
|
</div>
|
47
47
|
|
48
48
|
<div class="tab-pane" id="topics-pace" role="tabpanel">
|
data/lib/karafka/web/version.rb
CHANGED
data/lib/karafka/web.rb
CHANGED
@@ -15,8 +15,9 @@ module Karafka
|
|
15
15
|
class << self
|
16
16
|
# @return [WaterDrop::Producer, nil] waterdrop messages producer or nil if not yet fully
|
17
17
|
# initialized. It may not be fully initialized until the configuration is done
|
18
|
+
# @note Do NOT memoize producer as it may be updated after forking
|
18
19
|
def producer
|
19
|
-
|
20
|
+
Web.config.producer
|
20
21
|
end
|
21
22
|
|
22
23
|
# @return [String] root path of this gem
|
data.tar.gz.sig
CHANGED
Binary file
|