Skip to content

Commit

Permalink
[MINOR-PR] Enable telemetry APIs and logs suppression (KIP-714) (#14928)
Browse files Browse the repository at this point in the history
PR removes tag to mark API unstable in request json.
Suppresses couple of failed telemetry API logs as those unnecessary appear when telemetry is not supported on broker.

Reviewers: Walker Carlson <[email protected]>, Andrew Schofield <[email protected]>
  • Loading branch information
apoorvmittal10 authored Dec 6, 2023
1 parent 4a958c6 commit a05a0d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,13 @@ public void handleResponse(PushTelemetryResponse response) {

@Override
public void handleFailedGetTelemetrySubscriptionsRequest(KafkaException maybeFatalException) {
log.warn("The broker generated an error for the get telemetry network API request", maybeFatalException);
log.debug("The broker generated an error for the get telemetry network API request", maybeFatalException);
handleFailedRequest(maybeFatalException != null);
}

@Override
public void handleFailedPushTelemetryRequest(KafkaException maybeFatalException) {
log.warn("The broker generated an error for the push telemetry network API request", maybeFatalException);
log.debug("The broker generated an error for the push telemetry network API request", maybeFatalException);
handleFailedRequest(maybeFatalException != null);
}

Expand Down Expand Up @@ -825,7 +825,8 @@ private void handleFailedRequest(boolean shouldWait) {
return;
}
if (state != ClientTelemetryState.SUBSCRIPTION_IN_PROGRESS && state != ClientTelemetryState.PUSH_IN_PROGRESS) {
log.warn("Could not transition state after failed telemetry from state {}", state);
log.warn("Could not transition state after failed telemetry from state {}, disabling telemetry", state);
updateErrorResult(Integer.MAX_VALUE, nowMs);
return;
}

Expand All @@ -837,6 +838,7 @@ private void handleFailedRequest(boolean shouldWait) {
if (shouldWait) {
updateErrorResult(DEFAULT_PUSH_INTERVAL_MS, nowMs);
} else {
log.warn("Received unrecoverable error from broker, disabling telemetry");
updateErrorResult(Integer.MAX_VALUE, nowMs);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"name": "GetTelemetrySubscriptionsRequest",
"validVersions": "0",
"flexibleVersions": "0+",
// The Telemetry APIs are added as part of KIP-714 and are still under
// development. Hence, the APIs are not exposed by default unless explicitly
// enabled.
"latestVersionUnstable": true,
"fields": [
{
"name": "ClientInstanceId", "type": "uuid", "versions": "0+",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"name": "PushTelemetryRequest",
"validVersions": "0",
"flexibleVersions": "0+",
// The Telemetry APIs are added as part of KIP-714 and are still under
// development. Hence, the APIs are not exposed by default unless explicitly
// enabled.
"latestVersionUnstable": true,
"fields": [
{
"name": "ClientInstanceId", "type": "uuid", "versions": "0+",
Expand Down

0 comments on commit a05a0d7

Please sign in to comment.