karafka-web 0.6.0 → 0.6.1
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 +10 -1
- data/Gemfile.lock +1 -1
- data/lib/karafka/web/tracking/consumers/contracts/report.rb +7 -3
- data/lib/karafka/web/tracking/consumers/sampler.rb +2 -1
- data/lib/karafka/web/tracking/sampler.rb +5 -0
- data/lib/karafka/web/ui/models/status.rb +31 -7
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_metrics.erb +6 -1
- data/lib/karafka/web/ui/views/status/failures/_initial_state.erb +1 -10
- data/lib/karafka/web/ui/views/status/info/_components.erb +6 -1
- data/lib/karafka/web/ui/views/status/show.erb +6 -1
- data/lib/karafka/web/ui/views/status/successes/_connection.erb +1 -0
- data/lib/karafka/web/ui/views/status/warnings/_connection.erb +11 -0
- data/lib/karafka/web/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -2
- metadata.gz.sig +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25d9203285a7e2587ec78b57bcde9951c647e5eb026c4c32cd7040bfb844ae88
|
4
|
+
data.tar.gz: 46b15b79ebd7b6ce8d9a234c395a6f71bfb7891b8a9cb00d4121fd055bf3f727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529d6eff4eeae68edadd3989cf4e5de9c1c91ea5e0612e2df976717a8700bbbc53e4d917d0421a8e930392b973f19d8a31366be036955392f8ac9a89b821be69
|
7
|
+
data.tar.gz: bcd6de8973599bb034733dd2921cff7277f11aab5e735917695e87722049fcf8bf3a4bcdb6e52a86cbcc4c0dfa91d2ebe7f90c9cc9af3f484ae1b0c6a8dbe8a3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Karafka Web changelog
|
2
2
|
|
3
|
-
## 0.6.
|
3
|
+
## 0.6.1 (2023-06-25)
|
4
|
+
- [Improvement] Include the karafka-web version in the status page tags.
|
5
|
+
- [Improvement] Report `karafka-web` version that is running in particular processes.
|
6
|
+
- [Improvement] Display `karafka-web` version in the per-process view.
|
7
|
+
- [Improvement] Report in the web-ui a scenario, where getting cluster info takes more than 500ms as a warning to make people realize, that operating with Kafka with extensive latencies is not recommended.
|
8
|
+
- [Improvement] Continue the status assessment flow on warnings.
|
9
|
+
- [Fix] Do not recommend running a server as a way to bootstrap the initial state.
|
10
|
+
- [Fix] Ensure in the report contract, that `karafka-core`, `karafka-web`, `rdkafka` and `librdkafka` are validated.
|
11
|
+
|
12
|
+
## 0.6.0 (2023-06-13)
|
4
13
|
- **[Feature]** Introduce producers errors tracking.
|
5
14
|
- [Improvement] Display the error origin as a badge to align with consumers view topic assignments.
|
6
15
|
- [Improvement] Collect more job metrics for future usage.
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ module Karafka
|
|
12
12
|
class Report < Tracking::Contracts::Base
|
13
13
|
configure
|
14
14
|
|
15
|
-
required(:schema_version) { |val| val.is_a?(String) }
|
15
|
+
required(:schema_version) { |val| val.is_a?(String) && !val.empty? }
|
16
16
|
required(:dispatched_at) { |val| val.is_a?(Numeric) && val.positive? }
|
17
17
|
# We have consumers and producer reports and need to ensure that each is handled
|
18
18
|
# in an expected fashion
|
@@ -24,7 +24,7 @@ module Karafka
|
|
24
24
|
required(:memory_usage) { |val| val.is_a?(Integer) && val >= 0 }
|
25
25
|
required(:memory_total_usage) { |val| val.is_a?(Integer) && val >= 0 }
|
26
26
|
required(:memory_size) { |val| val.is_a?(Integer) && val >= 0 }
|
27
|
-
required(:status) { |val| ::Karafka::Status::STATES.key?(val.to_sym) }
|
27
|
+
required(:status) { |val| ::Karafka::Status::STATES.key?(val.to_s.to_sym) }
|
28
28
|
required(:listeners) { |val| val.is_a?(Integer) && val >= 0 }
|
29
29
|
required(:concurrency) { |val| val.is_a?(Integer) && val.positive? }
|
30
30
|
required(:tags) { |val| val.is_a?(Karafka::Core::Taggable::Tags) }
|
@@ -38,9 +38,13 @@ module Karafka
|
|
38
38
|
end
|
39
39
|
|
40
40
|
nested(:versions) do
|
41
|
+
required(:ruby) { |val| val.is_a?(String) && !val.empty? }
|
41
42
|
required(:karafka) { |val| val.is_a?(String) && !val.empty? }
|
43
|
+
required(:karafka_core) { |val| val.is_a?(String) && !val.empty? }
|
44
|
+
required(:karafka_web) { |val| val.is_a?(String) && !val.empty? }
|
42
45
|
required(:waterdrop) { |val| val.is_a?(String) && !val.empty? }
|
43
|
-
required(:
|
46
|
+
required(:rdkafka) { |val| val.is_a?(String) && !val.empty? }
|
47
|
+
required(:librdkafka) { |val| val.is_a?(String) && !val.empty? }
|
44
48
|
end
|
45
49
|
|
46
50
|
nested(:stats) do
|
@@ -75,8 +75,9 @@ module Karafka
|
|
75
75
|
versions: {
|
76
76
|
ruby: ruby_version,
|
77
77
|
karafka: karafka_version,
|
78
|
-
waterdrop: waterdrop_version,
|
79
78
|
karafka_core: karafka_core_version,
|
79
|
+
karafka_web: karafka_web_version,
|
80
|
+
waterdrop: waterdrop_version,
|
80
81
|
rdkafka: rdkafka_version,
|
81
82
|
librdkafka: librdkafka_version
|
82
83
|
},
|
@@ -32,6 +32,11 @@ module Karafka
|
|
32
32
|
::Karafka::VERSION
|
33
33
|
end
|
34
34
|
|
35
|
+
# @return [String] Karafka Web UI version
|
36
|
+
def karafka_web_version
|
37
|
+
::Karafka::Web::VERSION
|
38
|
+
end
|
39
|
+
|
35
40
|
# @return [String] Karafka::Core version
|
36
41
|
def karafka_core_version
|
37
42
|
::Karafka::Core::VERSION
|
@@ -5,6 +5,7 @@ module Karafka
|
|
5
5
|
module Ui
|
6
6
|
module Models
|
7
7
|
# Model that represents the general status of the Web UI.
|
8
|
+
#
|
8
9
|
# We use this data to display a status page that helps with debugging on what is missing
|
9
10
|
# in the overall setup of the Web UI.
|
10
11
|
#
|
@@ -15,7 +16,18 @@ module Karafka
|
|
15
16
|
Step = Struct.new(:status, :details) do
|
16
17
|
# @return [Boolean] is the given step successfully configured and working
|
17
18
|
def success?
|
18
|
-
status == :success
|
19
|
+
status == :success || status == :warning
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String] local namespace for partial of a given type
|
23
|
+
def partial_namespace
|
24
|
+
case status
|
25
|
+
when :success then 'successes'
|
26
|
+
when :warning then 'warnings'
|
27
|
+
when :failure then 'failures'
|
28
|
+
else
|
29
|
+
raise ::Karafka::Errors::UnsupportedCaseError, status
|
30
|
+
end
|
19
31
|
end
|
20
32
|
|
21
33
|
# @return [String] stringified status
|
@@ -29,11 +41,21 @@ module Karafka
|
|
29
41
|
connect
|
30
42
|
end
|
31
43
|
|
32
|
-
# @return [Status::Step] were we able to connect to Kafka or not
|
44
|
+
# @return [Status::Step] were we able to connect to Kafka or not and how fast.
|
45
|
+
# Some people try to work with Kafka over the internet with really high latency and this
|
46
|
+
# should be highlighted in the UI as often the connection just becomes unstable
|
33
47
|
def connection
|
48
|
+
level = if @connection_time < 1_000
|
49
|
+
:success
|
50
|
+
elsif @connection_time < 1_000_000
|
51
|
+
:warning
|
52
|
+
else
|
53
|
+
:failure
|
54
|
+
end
|
55
|
+
|
34
56
|
Step.new(
|
35
|
-
|
36
|
-
|
57
|
+
level,
|
58
|
+
{ time: @connection_time }
|
37
59
|
)
|
38
60
|
end
|
39
61
|
|
@@ -171,12 +193,14 @@ module Karafka
|
|
171
193
|
topics
|
172
194
|
end
|
173
195
|
|
174
|
-
# Tries connecting with the cluster and
|
196
|
+
# Tries connecting with the cluster and saves the cluster info and the connection time
|
197
|
+
# @note If fails, `connection_time` will be 1_000_000
|
175
198
|
def connect
|
199
|
+
started = Time.now.to_f
|
176
200
|
@cluster_info = ::Karafka::Admin.cluster_info
|
177
|
-
@
|
201
|
+
@connection_time = (Time.now.to_f - started) * 1_000
|
178
202
|
rescue ::Rdkafka::RdkafkaError
|
179
|
-
@
|
203
|
+
@connection_time = 1_000_000
|
180
204
|
end
|
181
205
|
end
|
182
206
|
end
|
@@ -7,14 +7,5 @@
|
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<p>
|
10
|
-
To fix this, you
|
11
|
-
</p>
|
12
|
-
|
13
|
-
<ul>
|
14
|
-
<li>Run <code>bundle exec karafka-web install</code></li>
|
15
|
-
<li>Run at least one Karafka consumer process</li>
|
16
|
-
</ul>
|
17
|
-
|
18
|
-
<p class="mb-0">
|
19
|
-
Any of the above, when successful, will bootstrap the initial state.
|
10
|
+
To fix this, you need to ensure that the <code>bundle exec karafka-web install</code> runs successfully.
|
20
11
|
</p>
|
@@ -8,7 +8,12 @@
|
|
8
8
|
"status/#{@status.connection.to_s}",
|
9
9
|
locals: {
|
10
10
|
title: 'Connection to Kafka',
|
11
|
-
description: partial(
|
11
|
+
description: partial(
|
12
|
+
"status/#{@status.connection.partial_namespace}/connection",
|
13
|
+
locals: {
|
14
|
+
details: @status.connection.details
|
15
|
+
}
|
16
|
+
)
|
12
17
|
}
|
13
18
|
)
|
14
19
|
%>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%# Expected to be empty. No content on success needed. %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p>
|
2
|
+
High latency detected when connecting to the Kafka cluster from the Web-UI.
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
Kafka is not designed to perform optimally under high network latencies; even when configurations seem appropriate, you may still encounter disconnects and other unexpected issues.
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p class="mb-0">
|
10
|
+
It took Web-UI <strong><%= details[:time].round(2) %> ms</strong> to get the cluster info.
|
11
|
+
</p>
|
data/lib/karafka/web/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
|
36
36
|
MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2023-06-
|
38
|
+
date: 2023-06-25 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: erubi
|
@@ -349,6 +349,8 @@ files:
|
|
349
349
|
- lib/karafka/web/ui/views/status/failures/_topics.erb
|
350
350
|
- lib/karafka/web/ui/views/status/info/_components.erb
|
351
351
|
- lib/karafka/web/ui/views/status/show.erb
|
352
|
+
- lib/karafka/web/ui/views/status/successes/_connection.erb
|
353
|
+
- lib/karafka/web/ui/views/status/warnings/_connection.erb
|
352
354
|
- lib/karafka/web/ui/views/status/warnings/_pro_subscription.erb
|
353
355
|
- lib/karafka/web/version.rb
|
354
356
|
- renovate.json
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
��z~Nu��<��7�������xA`���p�\�jcYd3�ݯ�mXJoF|w��A�d2X#�����n��AR��M�A�����ع���0$,�AN�2����*�J;
|
2
|
+
�ҀgkXs�ἦ�Nsr�s��'C_�Hj�*��$�:c��f�+�3�7�����ظ=�I�wy������y�?�
|
3
|
+
O��e����Ā��`V�0}��<Ϡ�' �Z�]na�M��F��K�6d6K�(*��2��Rk��*_��)��t��%\;s<�+�iAe��锼�.%��˔��V'��ȣ�������!s�f�c��n a�C���_�9u�&ҿ��c� JWS��LX�ŵ�8?��H&����(���ʡ�w�T�W�X��Q�s��
|