karafka-web 0.11.0.rc1 → 0.11.0.rc3

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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +6 -6
  4. data/config/locales/slogans.yml +1 -1
  5. data/docker-compose.yml +1 -1
  6. data/karafka-web.gemspec +1 -1
  7. data/lib/karafka/web/pro/ui/controllers/errors_controller.rb +8 -4
  8. data/lib/karafka/web/pro/ui/controllers/explorer/explorer_controller.rb +19 -9
  9. data/lib/karafka/web/pro/ui/views/consumers/jobs/_job.erb +1 -2
  10. data/lib/karafka/web/pro/ui/views/consumers/jobs/_no_jobs.erb +2 -6
  11. data/lib/karafka/web/pro/ui/views/consumers/partitions/offsets/edit.erb +5 -1
  12. data/lib/karafka/web/pro/ui/views/consumers/partitions/pauses/edit.erb +5 -1
  13. data/lib/karafka/web/pro/ui/views/consumers/partitions/pauses/new.erb +5 -1
  14. data/lib/karafka/web/pro/ui/views/errors/_breadcrumbs.erb +1 -6
  15. data/lib/karafka/web/pro/ui/views/errors/_error.erb +6 -1
  16. data/lib/karafka/web/pro/ui/views/errors/show.erb +39 -33
  17. data/lib/karafka/web/pro/ui/views/explorer/explorer/show.erb +76 -71
  18. data/lib/karafka/web/pro/ui/views/jobs/_job.erb +1 -2
  19. data/lib/karafka/web/tracking/consumers/listeners/errors.rb +1 -0
  20. data/lib/karafka/web/ui/base.rb +2 -0
  21. data/lib/karafka/web/ui/controllers/errors_controller.rb +12 -3
  22. data/lib/karafka/web/ui/helpers/application_helper.rb +0 -70
  23. data/lib/karafka/web/ui/helpers/time_helper.rb +82 -0
  24. data/lib/karafka/web/ui/helpers/topics_helper.rb +156 -0
  25. data/lib/karafka/web/ui/models/message.rb +20 -2
  26. data/lib/karafka/web/ui/public/stylesheets/application.min.css +10 -35
  27. data/lib/karafka/web/ui/public/stylesheets/application.min.css.br +0 -0
  28. data/lib/karafka/web/ui/public/stylesheets/application.min.css.gz +0 -0
  29. data/lib/karafka/web/ui/routes/errors.rb +5 -1
  30. data/lib/karafka/web/ui/views/consumers/_assignments_badges.erb +2 -7
  31. data/lib/karafka/web/ui/views/errors/_breadcrumbs.erb +3 -8
  32. data/lib/karafka/web/ui/views/errors/_error.erb +6 -1
  33. data/lib/karafka/web/ui/views/errors/show.erb +39 -33
  34. data/lib/karafka/web/ui/views/jobs/_job.erb +1 -2
  35. data/lib/karafka/web/ui/views/shared/_compacted_message_info.erb +16 -0
  36. data/lib/karafka/web/version.rb +1 -1
  37. data/package-lock.json +73 -73
  38. data/package.json +6 -6
  39. data/renovate.json +7 -0
  40. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 323655d05b3e4b77ddce36c63cee362ef711c89256cbcb97db6ea57c8939a398
4
- data.tar.gz: c26e39271b910a860a85a22296a85f37367706754448fd96379cf6d0e4d4f101
3
+ metadata.gz: 5263c3a83f8cbd944097fb7889c936836fc0dc09880f4d14e87783a1ea55142b
4
+ data.tar.gz: 5a4ae04fb60f88132ca5855879a689471969f9c1b3d957ef2d9798d112c81ef3
5
5
  SHA512:
6
- metadata.gz: 9632693f31939e911fba49a2a2ecb6c85e8cd468a01daa275d910d2c23b3e9b39a1ebc83d99cf5ed552fe794d9c7c1fe05097e4a5fa718190c8c1979df0ce743
7
- data.tar.gz: d90eeb89e20b214a94450896a8cc65b7fceb73e1b1f7c02aedddb0af3953b500c97b50e70bc993b9a54de074179650b680f96f4b36c0aefc9bc490784720e10d
6
+ metadata.gz: 7d22123886f177f58f20783e6abe09fd84fc8d7554ac6f47a7103176f2c48a700c7e9ec90f38e72859dc54e51c959c7486b2f7b43512f6e3f649ca87498c3bd8
7
+ data.tar.gz: 33eb094a22870bb238016b018aa986f9914523eda62587f9d3cfc462249a62bbd88e66d2cb605c2fb6309fc5c7d1a03412c7cc3b1db9a5560a6d9ea7e11aa205
data/CHANGELOG.md CHANGED
@@ -27,6 +27,8 @@
27
27
  - [Enhancement] Use more performant Kafka API calls to describe topics.
28
28
  - [Enhancement] Inject `.action-NAME` and `.controller-NAME` body classes for usage with custom CSS and JS.
29
29
  - [Enhancement] Improve error handling in the commanding iterator listener (Pro).
30
+ - [Enhancement] Introduce `trace_id` to the errors tracked for DLQ correlation (if in use) (Pro).
31
+ - [Enhancement] Normalize how topics with partitions data is being displayed (`topic-[0,1,2]` etc).
30
32
  - [Change] Do not fully hide config-disabled features but make them disabled.
31
33
  - [Change] Remove per-consumer process duplicated details from Subscriptions and Jobs tabs.
32
34
  - [Change] Move to trusted-publishers and remove signing since no longer needed.
@@ -53,6 +55,10 @@
53
55
  - [Fix] Ensure that when flashes or alerts are visible, pages are not auto-refreshed (would cause them to dissapear).
54
56
  - [Fix] Time selector in the explorer does not disappear after clicking out.
55
57
  - [Fix] Tombstone message presentation epoch doesn't make sense.
58
+ - [Fix] Fix incorrectly displayed "No jobs" alert info.
59
+ - [Fix] Previous / next navigation in the explorer does not work when moving to transactional checkpoints.
60
+ - [Fix] Errors explorer does not work with transactional produced data.
61
+ - [Fix] Errors explorer in OSS does not have pagination.
56
62
  - [Maintenance] Require `karafka-core` `>= 2.4.8` and `karafka` `>= 2.4.16`.
57
63
  - [Maintenance] Update `AirDatepicker` to `3.6.0`.
58
64
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-web (0.11.0.rc1)
4
+ karafka-web (0.11.0.rc3)
5
5
  erubi (~> 1.4)
6
- karafka (>= 2.5.0.beta1, < 2.6.0)
6
+ karafka (>= 2.5.0.rc1, < 2.6.0)
7
7
  karafka-core (>= 2.5.0, < 2.6.0)
8
8
  roda (~> 3.68, >= 3.69)
9
9
  tilt (~> 2.0)
@@ -35,7 +35,7 @@ GEM
35
35
  erubi (1.13.1)
36
36
  et-orbi (1.2.11)
37
37
  tzinfo
38
- factory_bot (6.5.3)
38
+ factory_bot (6.5.4)
39
39
  activesupport (>= 6.1.0)
40
40
  ffi (1.17.2)
41
41
  ffi (1.17.2-aarch64-linux-gnu)
@@ -53,13 +53,13 @@ GEM
53
53
  raabro (~> 1.4)
54
54
  i18n (1.14.7)
55
55
  concurrent-ruby (~> 1.0)
56
- karafka (2.5.0.rc1)
56
+ karafka (2.5.0.rc2)
57
57
  base64 (~> 0.2)
58
- karafka-core (>= 2.5.0, < 2.6.0)
58
+ karafka-core (>= 2.5.2, < 2.6.0)
59
59
  karafka-rdkafka (>= 0.19.5)
60
60
  waterdrop (>= 2.8.3, < 3.0.0)
61
61
  zeitwerk (~> 2.3)
62
- karafka-core (2.5.1)
62
+ karafka-core (2.5.2)
63
63
  karafka-rdkafka (>= 0.19.2, < 0.21.0)
64
64
  logger (>= 1.6.0)
65
65
  karafka-rdkafka (0.19.5)
@@ -43,7 +43,7 @@ en:
43
43
  - "Are you concerned about managing large data flows? Virtual Partitions in Karafka Pro simplify data processing, offering unparalleled efficiency and scalability."
44
44
  - "Looking for flexible scheduling solutions? Karafka's Pro Periodic Jobs feature allows precise task timing and execution, enhancing your application's performance and reliability."
45
45
  - "Need advanced routing capabilities? Routing Patterns in Karafka Pro provide dynamic message routing, improving your system's adaptability and efficiency."
46
- - "Are you Seeking to control your workload? With Rate Limiting in Karafka Pro, you can effectively manage and balance your system's load, ensuring optimal performance under any conditions."
46
+ - "Are you seeking to control your workload? With Rate Limiting in Karafka Pro, you can effectively manage and balance your system's load, ensuring optimal performance under any conditions."
47
47
  - "Need quick data access methods? The Iterator API in Karafka Pro provides efficient data retrieval methods."
48
48
  - "Want more nuanced error handling? Discover Granular Backoffs in Karafka Pro, which allows for detailed control over retry mechanisms and error recovery processes."
49
49
  - "Need a boost in data processing speed? Multiplexing in Karafka Pro enables parallel processing, significantly increasing throughput and reducing processing times."
data/docker-compose.yml CHANGED
@@ -3,7 +3,7 @@ version: '2'
3
3
  services:
4
4
  kafka:
5
5
  container_name: kafka
6
- image: confluentinc/cp-kafka:7.9.1
6
+ image: confluentinc/cp-kafka:8.0.0
7
7
 
8
8
  ports:
9
9
  - 9092:9092
data/karafka-web.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.licenses = %w[LGPL-3.0-only Commercial]
18
18
 
19
19
  spec.add_dependency 'erubi', '~> 1.4'
20
- spec.add_dependency 'karafka', '>= 2.5.0.beta1', '< 2.6.0'
20
+ spec.add_dependency 'karafka', '>= 2.5.0.rc1', '< 2.6.0'
21
21
  spec.add_dependency 'karafka-core', '>= 2.5.0', '< 2.6.0'
22
22
  spec.add_dependency 'roda', '~> 3.68', '>= 3.69'
23
23
  spec.add_dependency 'tilt', '~> 2.0'
@@ -46,7 +46,8 @@ module Karafka
46
46
  previous_offset,
47
47
  @params.current_offset,
48
48
  next_offset,
49
- @error_messages.map(&:offset)
49
+ # If message is an array, it means it's a compacted dummy offset representation
50
+ @error_messages.map { |message| message.is_a?(Array) ? message.last : message.offset }
50
51
  )
51
52
 
52
53
  render
@@ -59,13 +60,16 @@ module Karafka
59
60
  def show(partition_id, offset)
60
61
  @partition_id = partition_id
61
62
  @offset = offset
63
+
64
+ watermark_offsets = Models::WatermarkOffsets.find(errors_topic, partition_id)
65
+
62
66
  @error_message = Models::Message.find(
63
67
  errors_topic,
64
- @partition_id,
65
- @offset
68
+ partition_id,
69
+ offset,
70
+ watermark_offsets: watermark_offsets
66
71
  )
67
72
 
68
- watermark_offsets = Models::WatermarkOffsets.find(errors_topic, partition_id)
69
73
  paginate(offset, watermark_offsets.low, watermark_offsets.high)
70
74
 
71
75
  render
@@ -91,20 +91,30 @@ module Karafka
91
91
  @topic_id = topic_id
92
92
  @partition_id = partition_id
93
93
  @offset = offset
94
- @message = Models::Message.find(@topic_id, @partition_id, @offset)
95
94
 
96
- @safe_key = Web::Pro::Ui::Lib::SafeRunner.new { @message.key }.tap(&:call)
97
- @safe_headers = Web::Pro::Ui::Lib::SafeRunner.new { @message.headers }.tap(&:call)
98
- @safe_payload = Web::Pro::Ui::Lib::SafeRunner.new { @message.payload }.tap(&:call)
95
+ watermark_offsets = Models::WatermarkOffsets.find(topic_id, partition_id)
96
+
97
+ @message = Models::Message.find(
98
+ @topic_id,
99
+ @partition_id,
100
+ @offset,
101
+ watermark_offsets: watermark_offsets
102
+ )
103
+
104
+ # Only if it is not a compacted message we can deserialize stuff
105
+ if @message
106
+ @safe_key = Web::Pro::Ui::Lib::SafeRunner.new { @message.key }.tap(&:call)
107
+ @safe_headers = Web::Pro::Ui::Lib::SafeRunner.new { @message.headers }.tap(&:call)
108
+ @safe_payload = Web::Pro::Ui::Lib::SafeRunner.new { @message.payload }.tap(&:call)
109
+ end
99
110
 
100
111
  # This may be off for certain views like recent view where we are interested only
101
112
  # in the most recent all the time. It does not make any sense to display pagination
102
113
  # there
103
- if paginate
104
- # We need watermark offsets to decide if we can paginate left and right
105
- watermark_offsets = Models::WatermarkOffsets.find(topic_id, partition_id)
106
- paginate(offset, watermark_offsets.low, watermark_offsets.high)
107
- end
114
+ #
115
+ # We need watermark offsets to decide if we can paginate left and right
116
+ # We check that because it may have got here via the transactional flow
117
+ paginate(offset, watermark_offsets.low, watermark_offsets.high) if paginate
108
118
 
109
119
  render
110
120
  end
@@ -4,8 +4,7 @@
4
4
  <tr>
5
5
  <td>
6
6
  <span class="badge badge-secondary" title="Consumer group: <%= job.consumer_group %>">
7
- <%= job.topic %>:
8
- <%= job.partition %>
7
+ <%= topics_partition_identifier(job.topic, job.partition) %>
9
8
  </span>
10
9
  </td>
11
10
  <td>
@@ -1,10 +1,6 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <div class="container mb-4">
5
- <div class="row">
6
- <div class="col-lg-12">
7
- <%== alert_info("This process has no #{type} jobs at the moment.") %>
8
- </div>
9
- </div>
4
+ <div class="col-lg-12">
5
+ <%== alert_info("This process has no #{type} jobs at the moment.") %>
10
6
  </div>
@@ -1,7 +1,11 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <% view_title "#{@process.id} - Offset Adjustment - #{@subscription_group_id} - #{@topic}##{@partition_id}" %>
4
+ <%
5
+ tpi = topics_partition_identifier(@topic, @partition_id)
6
+
7
+ view_title "#{@process.id} - Offset Adjustment - #{@subscription_group_id} - #{tpi}"
8
+ %>
5
9
 
6
10
  <% if @process.status != 'running' %>
7
11
  <%== partial 'consumers/partitions/offsets/not_running_error' %>
@@ -1,7 +1,11 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <% view_title "#{@process.id} - Pause Adjustment - #{@subscription_group_id} - #{@topic}##{@partition_id}" %>
4
+ <%
5
+ tpi = topics_partition_identifier(@topic, @partition_id)
6
+
7
+ view_title "#{@process.id} - Pause Adjustment - #{@subscription_group_id} - #{tpi}"
8
+ %>
5
9
 
6
10
  <% if @topic_lrj %>
7
11
  <%== partial 'consumers/partitions/pauses/lrj_not_manageable' %>
@@ -1,7 +1,11 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <% view_title "#{@process.id} - Pause Adjustment - #{@subscription_group_id} - #{@topic}##{@partition_id}" %>
4
+ <%
5
+ tpi = topics_partition_identifier(@topic, @partition_id)
6
+
7
+ view_title "#{@process.id} - Pause Adjustment - #{@subscription_group_id} - #{tpi}"
8
+ %>
5
9
 
6
10
  <% if @topic_lrj %>
7
11
  <%== partial 'consumers/partitions/pauses/lrj_not_manageable' %>
@@ -18,12 +18,7 @@
18
18
  <% if @offset %>
19
19
  <li>
20
20
  <a href="<%= root_path('errors', @partition_id, @offset) %>">
21
- <%=
22
- type = @error_message.payload[:type]
23
- error_class = @error_message.payload[:error_class]
24
-
25
- "#{type}: #{error_class}"
26
- %>
21
+ <%= "Offset #{@offset}" %>
27
22
  </a>
28
23
  </li>
29
24
  <% end %>
@@ -10,7 +10,12 @@
10
10
  <td>
11
11
  <span class="badge badge-secondary">
12
12
  <% if error[:details].key?(:topic) %>
13
- <%= error[:details][:topic] %>: <%= error[:details][:partition] %>
13
+ <%=
14
+ topic = error[:details][:topic]
15
+ partition = error[:details][:partition]
16
+
17
+ topics_partition_identifier(topic, partition)
18
+ %>
14
19
  <% else %>
15
20
  <%= error[:type] %>
16
21
  <% end %>
@@ -1,42 +1,48 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <%
5
- type = @error_message.payload[:type]
6
- error_class = @error_message.payload[:error_class]
4
+ <% if @error_message %>
5
+ <%
6
+ type = @error_message.payload[:type]
7
+ error_class = @error_message.payload[:error_class]
7
8
 
8
- view_title("#{type}: #{error_class}")
9
- %>
9
+ view_title("#{type}: #{error_class}")
10
+ %>
10
11
 
11
- <div class="col-span-12 mb-3">
12
- <h2 class="h2">
13
- Metadata
14
- </h2>
12
+ <div class="col-span-12 mb-3">
13
+ <h2 class="h2">
14
+ Metadata
15
+ </h2>
15
16
 
16
- <div class="data-table-wrapper">
17
- <table class="data-table">
18
- <tbody>
19
- <% @error_message.payload.each do |k, v| %>
20
- <% next if k == :backtrace %>
21
- <%==
22
- partial(
23
- 'errors/detail',
24
- locals: {
25
- k: k,
26
- v: v
27
- }
28
- )
29
- %>
30
- <% end %>
31
- </tbody>
32
- </table>
17
+ <div class="data-table-wrapper">
18
+ <table class="data-table">
19
+ <tbody>
20
+ <% @error_message.payload.each do |k, v| %>
21
+ <% next if k == :backtrace %>
22
+ <%==
23
+ partial(
24
+ 'errors/detail',
25
+ locals: {
26
+ k: k,
27
+ v: v
28
+ }
29
+ )
30
+ %>
31
+ <% end %>
32
+ </tbody>
33
+ </table>
34
+ </div>
33
35
  </div>
34
- </div>
35
36
 
36
- <div class="col-span-12 mb-3">
37
- <h2 class="h2">
38
- Backtrace
39
- </h2>
37
+ <div class="col-span-12 mb-3">
38
+ <h2 class="h2">
39
+ Backtrace
40
+ </h2>
40
41
 
41
- <pre class="mb-5 p-0 border border-gray-300 text-sm"><code class="wrapped json p-0 m-0"><%= @error_message.payload[:backtrace] %></code></pre>
42
- </div>
42
+ <pre class="mb-5 p-0 border border-gray-300 text-sm"><code class="wrapped json p-0 m-0"><%= @error_message.payload[:backtrace] %></code></pre>
43
+ </div>
44
+ <% else %>
45
+ <% view_title "Offset #{@offset}" %>
46
+
47
+ <%== partial 'shared/compacted_message_info' %>
48
+ <% end %>
@@ -1,95 +1,100 @@
1
1
  <%# This code is part of Karafka Pro, a commercial component not licensed under LGPL. %>
2
2
  <%# See LICENSE for details. %>
3
3
 
4
- <% view_title "Message with offset #{@message.offset} from partition #{@message.partition}" %>
4
+ <% if @message %>
5
+ <% view_title "Message with offset #{@offset} from partition #{@partition_id}" %>
5
6
 
6
- <%
7
- republish_path = explorer_messages_path(@message.topic, @message.partition, @message.offset, 'republish')
8
- surrounding_path = explorer_topics_path(@message.topic, @message.partition, @message.offset, 'surrounding')
9
- %>
7
+ <%
8
+ republish_path = explorer_messages_path(@message.topic, @message.partition, @message.offset, 'republish')
9
+ surrounding_path = explorer_topics_path(@message.topic, @message.partition, @message.offset, 'surrounding')
10
+ %>
11
+ <div class="col-span-12">
12
+ <section class="actions">
13
+ <% if @visibility_filter.republish?(@message) %>
14
+ <a
15
+ href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'forward') %>"
16
+ class="btn-action"
17
+ title="Republish this message"
18
+ >
19
+ <%== icon(:arrow_uturn_right) %>
20
+ </a>
21
+ <% end %>
10
22
 
11
- <div class="col-span-12">
12
- <section class="actions">
13
- <% if @visibility_filter.republish?(@message) %>
14
23
  <a
15
- href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'forward') %>"
24
+ href="<%= surrounding_path %>"
16
25
  class="btn-action"
17
- title="Republish this message"
26
+ title="Go to this message surrounding position"
18
27
  >
19
- <%== icon(:arrow_uturn_right) %>
28
+ <%== icon(:arrows_right_left) %>
20
29
  </a>
21
- <% end %>
22
30
 
23
- <a
24
- href="<%= surrounding_path %>"
25
- class="btn-action"
26
- title="Go to this message surrounding position"
27
- >
28
- <%== icon(:arrows_right_left) %>
29
- </a>
31
+ <% if @visibility_filter.download?(@message) %>
32
+ <a
33
+ href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'download') %>"
34
+ class="btn-action"
35
+ title="Download raw payload"
36
+ data-turbo="false"
37
+ >
38
+ <%== icon(:arrow_down_tray) %>
39
+ </a>
40
+ <% end %>
30
41
 
31
- <% if @visibility_filter.download?(@message) %>
32
- <a
33
- href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'download') %>"
34
- class="btn-action"
35
- title="Download raw payload"
36
- data-turbo="false"
42
+ <% if @visibility_filter.export?(@message) && @safe_payload.success? %>
43
+ <a
44
+ href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'export') %>"
45
+ class="btn-action"
46
+ title="Export as JSON"
47
+ data-turbo="false"
48
+ >
49
+ <%== icon(:arrow_down_on_square) %>
50
+ </a>
51
+ <% end %>
52
+
53
+ <button
54
+ class="btn-action btn-toggle"
55
+ title="Show the message metadata details"
56
+ id="metadata-button"
57
+ data-toggle-target="metadata-details"
37
58
  >
38
- <%== icon(:arrow_down_tray) %>
39
- </a>
40
- <% end %>
59
+ <%== icon(:circle_stack) %>
60
+ </button>
41
61
 
42
- <% if @visibility_filter.export?(@message) && @safe_payload.success? %>
43
- <a
44
- href="<%= explorer_messages_path(@message.topic, @message.partition, @message.offset, 'export') %>"
45
- class="btn-action"
46
- title="Export as JSON"
47
- data-turbo="false"
62
+ <button
63
+ class="btn-action btn-toggle"
64
+ title="Show the message utilization details"
65
+ id="utilization-button"
66
+ data-toggle-target="utilization-details"
48
67
  >
49
- <%== icon(:arrow_down_on_square) %>
50
- </a>
51
- <% end %>
68
+ <%== icon(:cpu) %>
69
+ </button>
70
+ </section>
71
+ </div>
52
72
 
53
- <button
54
- class="btn-action btn-toggle"
55
- title="Show the message metadata details"
56
- id="metadata-button"
57
- data-toggle-target="metadata-details"
58
- >
59
- <%== icon(:circle_stack) %>
60
- </button>
73
+ <div class="col-span-12 mb-6">
74
+ <div id="utilization-details" class="hidden">
75
+ <h2 class="h2">
76
+ Utilization
77
+ </h2>
61
78
 
62
- <button
63
- class="btn-action btn-toggle"
64
- title="Show the message utilization details"
65
- id="utilization-button"
66
- data-toggle-target="utilization-details"
67
- >
68
- <%== icon(:cpu) %>
69
- </button>
70
- </section>
71
- </div>
79
+ <%== partial 'explorer/explorer/message/resources_utilization' %>
80
+ </div>
72
81
 
73
- <div class="col-span-12 mb-6">
74
- <div id="utilization-details" class="hidden">
75
- <h2 class="h2">
76
- Utilization
77
- </h2>
82
+ <div id="metadata-details">
83
+ <h2 class="h2">
84
+ Metadata
85
+ </h2>
78
86
 
79
- <%== partial 'explorer/explorer/message/resources_utilization' %>
80
- </div>
87
+ <%== partial 'explorer/explorer/message/metadata' %>
88
+ </div>
81
89
 
82
- <div id="metadata-details">
83
90
  <h2 class="h2">
84
- Metadata
91
+ Payload
85
92
  </h2>
86
93
 
87
- <%== partial 'explorer/explorer/message/metadata' %>
94
+ <%== partial 'explorer/explorer/message/payload' %>
88
95
  </div>
96
+ <% else %>
97
+ <% view_title "Message with offset #{@offset} from partition #{@partition_id} (No Data)" %>
89
98
 
90
- <h2 class="h2">
91
- Payload
92
- </h2>
93
-
94
- <%== partial 'explorer/explorer/message/payload' %>
95
- </div>
99
+ <%== partial 'shared/compacted_message_info' %>
100
+ <% end %>
@@ -9,8 +9,7 @@
9
9
  </td>
10
10
  <td>
11
11
  <span class="badge badge-secondary" title="Consumer group: <%= job.consumer_group %>">
12
- <%= job.topic %>:
13
- <%= job.partition %>
12
+ <%= topics_partition_identifier(job.topic, job.partition) %>
14
13
  </span>
15
14
  </td>
16
15
  <td>
@@ -85,6 +85,7 @@ module Karafka
85
85
  # with -1001, which is "N/A" offset position for all the offsets here
86
86
  committed_offset: (consumer.coordinator.seek_offset || -1_000) - 1,
87
87
  consumer: consumer.class.to_s,
88
+ trace_id: Karafka.pro? ? consumer.errors_tracker.trace_id : nil,
88
89
  tags: consumer.tags
89
90
  }
90
91
  end
@@ -7,6 +7,8 @@ module Karafka
7
7
  class Base < Roda
8
8
  include Helpers::PathsHelper
9
9
  include Helpers::ApplicationHelper
10
+ include Helpers::TimeHelper
11
+ include Helpers::TopicsHelper
10
12
  include Helpers::TailwindHelper
11
13
 
12
14
  # Details that need to be evaluated in the context of OSS or Pro web UI.
@@ -17,7 +17,8 @@ module Karafka
17
17
  previous_offset,
18
18
  @params.current_offset,
19
19
  next_offset,
20
- @error_messages.map(&:offset)
20
+ # If message is an array, it means it's a compacted dummy offset representation
21
+ @error_messages.map { |message| message.is_a?(Array) ? message.last : message.offset }
21
22
  )
22
23
 
23
24
  render
@@ -25,12 +26,20 @@ module Karafka
25
26
 
26
27
  # @param offset [Integer] given error message offset
27
28
  def show(offset)
29
+ @partition_id = 0
30
+ @offset = offset
31
+
32
+ watermark_offsets = Models::WatermarkOffsets.find(errors_topic, @partition_id)
33
+
28
34
  @error_message = Models::Message.find(
29
35
  errors_topic,
30
- 0,
31
- offset
36
+ @partition_id,
37
+ offset,
38
+ watermark_offsets: watermark_offsets
32
39
  )
33
40
 
41
+ paginate(offset, watermark_offsets.low, watermark_offsets.high)
42
+
34
43
  render
35
44
  end
36
45