rishi-rana commented on code in PR #23444:
URL: https://github.com/apache/kafka/pull/23444#discussion_r4007299149


##########
server/src/main/java/org/apache/kafka/server/ClientMetricsManager.java:
##########
@@ -216,6 +216,14 @@ public PushTelemetryResponse 
processPushTelemetryRequest(PushTelemetryRequest re
                 long exportTimeStartMs = time.hiResClockMs();
                 clientTelemetryExporterPlugin.exportMetrics(requestContext, 
request, clientInstance.pushIntervalMs(), clientTelemetryMaxBytes);
                 clientMetricsStats.recordPluginExport(clientInstanceId, 
time.hiResClockMs() - exportTimeStartMs);
+            } catch (TelemetryTooLargeException exception) {
+                // The decompressed payload exceeded the configured size 
limit. This is retryable (the client may
+                // shrink its metric set or the broker may be reconfigured), 
unlike a malformed payload, so it must
+                // not be reported as INVALID_RECORD: that error tells the 
client to stop pushing telemetry entirely.
+                clientMetricsStats.recordPluginErrorCount(clientInstanceId);
+                clientInstance.lastKnownError(Errors.TELEMETRY_TOO_LARGE);
+                log.error("Error exporting client metrics to the plugin for 
client instance id: {}", clientInstanceId, exception);

Review Comment:
   Good point, done — switched to WARN with just `exception.toString()`, no 
stack trace.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to