ferenc-csaky commented on code in PR #5:
URL:
https://github.com/apache/flink-connector-http/pull/5#discussion_r2585036272
##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/sink/httpclient/JavaNetSinkHttpClient.java:
##########
@@ -114,7 +118,7 @@ private SinkHttpClientResponse
prepareSinkHttpClientResponse(
for (var response : responses) {
var sinkRequestEntry = response.getHttpRequest();
var optResponse = response.getResponse();
-
+
HttpLogger.getHttpLogger(properties).logResponse(response.getResponse().get());
Review Comment:
In that case, there are 2 options IMO:
1. Make `HttpLogger` serializable
2. At least move out the init from the `for` loop
Personally I like option 1. more, cause it does not really matter if we
serialize the props or the logger object. And another benefit is IDK if those
`properties` could contain sensitive fields, cause if yes, then serializing
them also means a security leak, which gets mitigated if we serialize the
logger object, which does not contain the whole props object anymore.
--
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]