Skip to content

Conversation

@DL1231
Copy link
Contributor

@DL1231 DL1231 commented Oct 17, 2025

see https://github.com/apache/kafka/pull/20661/files#r2433576874
Suppress warning logs for UnsupportedVersionException in
ClientTelemetryReporter.

Reviewers: Andrew Schofield aschofield@confluent.io

@github-actions github-actions bot added triage PRs from the community clients small Small PRs labels Oct 17, 2025
@DL1231 DL1231 changed the title MINOR: Do not print the warning if the error is an UnsupportedVersionException MINOR: Suppress warning logs for UnsupportedVersionException in ClientTelemetryReporter Oct 17, 2025
@AndrewJSchofield AndrewJSchofield added ci-approved and removed triage PRs from the community labels Oct 17, 2025
@AndrewJSchofield AndrewJSchofield self-requested a review October 17, 2025 11:07
Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR to remove an annoying log message that's appeared recently :)

again. We may disconnect from the broker and connect to a broker that supports client
telemetry.
*/
boolean shouldWait = isRetryable(maybeFatalException);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd prefer to see

if (isRetryable(maybeFatalException))

There's no need for a shouldWait variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also, given that it's a RetriableException, why not isRetriable too?

updateErrorResult(DEFAULT_PUSH_INTERVAL_MS, nowMs);
} else {
log.warn("Received unrecoverable error from broker, disabling telemetry");
boolean shouldLog = shouldLog(maybeFatalException);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also just check maybeFatalException instanceof UnsupportedVersionException rather than hiding the check in a method. Do we really have to handle the case of the exception being wrapped by another exception?

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AndrewJSchofield AndrewJSchofield merged commit 618c87b into apache:trunk Oct 20, 2025
21 checks passed
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DL1231 thanks for this fix.

@AndrewJSchofield Since KAFKA-19747 was merged into trunk, 4.1, and 4.0, this fix should be backported to those branches as well. WDYT?

chia7712 pushed a commit that referenced this pull request Oct 22, 2025
…tTelemetryReporter (#20722)

see https://github.com/apache/kafka/pull/20661/files#r2433576874
Suppress warning logs for `UnsupportedVersionException` in
`ClientTelemetryReporter`.

Reviewers: Andrew Schofield <aschofield@confluent.io>
chia7712 pushed a commit that referenced this pull request Oct 22, 2025
…tTelemetryReporter (#20722)

see https://github.com/apache/kafka/pull/20661/files#r2433576874
Suppress warning logs for `UnsupportedVersionException` in
`ClientTelemetryReporter`.

Reviewers: Andrew Schofield <aschofield@confluent.io>
@chia7712
Copy link
Member

I have pushed this patch to 4.1 and 4.0

4099f75
27c87dd

@AndrewJSchofield
Copy link
Member

I have pushed this patch to 4.1 and 4.0

4099f75 27c87dd

Yes, good idea. Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants