Commit 1611e01
fix: collect KafkaTopicSample on Kafka 4.x (DescribeConfigs version)
Kafka 4.0 removed DescribeConfigs API v0 (the broker minimum is now v1),
so the hardcoded v0 request used for topic and broker configuration
collection failed against 4.x brokers. As a result KafkaTopicSample was
dropped entirely, while KafkaBrokerSample/KafkaProducerSample/
KafkaConsumerSample/KafkaOffsetSample (JMX- and other-API-based) kept
working - matching the reported "topic samples missing on Kafka 4.x".
Derive the DescribeConfigs request version from the negotiated
KAFKA_VERSION (v2 if >= 2.0.0, v1 if >= 1.1.0, else v0; sarama v1.43.x
supports DescribeConfigs up to v2), and raise the default KAFKA_VERSION
from 1.0.0 to 2.1.0 so topic and broker configuration collection works
against Kafka 4.x out of the box with no user configuration.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ea9a04d commit 1611e01
5 files changed
Lines changed: 31 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
194 | 205 | | |
195 | | - | |
196 | | - | |
| 206 | + | |
| 207 | + | |
197 | 208 | | |
198 | 209 | | |
199 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
209 | 220 | | |
210 | | - | |
211 | | - | |
| 221 | + | |
| 222 | + | |
212 | 223 | | |
213 | 224 | | |
214 | 225 | | |
| |||
0 commit comments