KAFKA-18041: Update key for storing global consumer instance id for consistency (#17869)

This PR updates the key for storing the KIP-714 client instance id for the global consumer to follow a more consistent pattern of the other embedded Kafka Streams consumer clients.

Reviewers: Matthias Sax <mjsax@apache.org>
This commit is contained in:
Bill Bejeck 2024-11-20 16:14:03 -05:00 committed by GitHub
parent aa7a3dbd30
commit fd9de50de1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -135,6 +135,12 @@
<h3><a id="streams_api_changes_400" href="#streams_api_changes_400">Streams API changes in 4.0.0</a></h3>
<p>
In this release the <code>ClientInstanceIds</code> instance stores the global consumer<code>Uuid</code> for the
<a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability#KIP714:Clientmetricsandobservability-Clientidentificationandtheclientinstanceid">KIP-714</a>
id with a key of global stream-thread name appended with <code>"-global-consumer"</code> where before it was only the global stream-thread name.
</p>
<p>
In this release two configs <code>default.deserialization.exception.handler</code> and <code>default.production.exception.handler</code> are deprecated, as they don't have any overwrites, which is described in
<a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-1056%3A+Remove+%60default.%60+prefix+for+exception+handler+StreamsConfig">KIP-1056</a>

View File

@ -160,7 +160,7 @@ public class KafkaStreamsTelemetryIntegrationTest {
final Uuid mainConsumerInstanceId = clientInstanceIds.consumerInstanceIds().entrySet().stream()
.filter(entry -> !entry.getKey().endsWith("-restore-consumer")
&& !entry.getKey().endsWith("GlobalStreamThread"))
&& !entry.getKey().endsWith("GlobalStreamThread-global-consumer"))
.map(Map.Entry::getValue)
.findFirst().orElseThrow();
assertNotNull(adminInstanceId);

View File

@ -1939,7 +1939,7 @@ public class KafkaStreams implements AutoCloseable {
// could be `null` if telemetry is disabled on the client itself
if (instanceId != null) {
clientInstanceIds.addConsumerInstanceId(
globalStreamThread.getName(),
globalStreamThread.getName() + "-global-consumer",
instanceId
);
} else {