weiqingy commented on code in PR #609:
URL: https://github.com/apache/flink-agents/pull/609#discussion_r3162098193


##########
runtime/src/main/java/org/apache/flink/agents/runtime/eventlog/EventLogRecord.java:
##########
@@ -31,23 +35,82 @@
  *
  * <p>The class uses custom JSON serialization/deserialization to handle 
polymorphic Event types by
  * leveraging the eventType information stored in the EventContext.
+ *
+ * <p>Each record carries a {@link EventLogLevel} that controls truncation 
behavior during
+ * serialization, and a convenience copy of the event type string from the 
context.
  */
 @JsonSerialize(using = EventLogRecordJsonSerializer.class)
 @JsonDeserialize(using = EventLogRecordJsonDeserializer.class)
 public class EventLogRecord {
     private final EventContext context;
     private final Event event;
+    private final EventLogLevel logLevel;
+    private final String eventType;
+    @Nullable private final transient JsonTruncator truncator;
+    @Nullable private final transient Counter truncatedEventsCounter;

Review Comment:
   Good call. In `c4596bc` `EventLogRecord` is reduced to just `(context, 
event)`; `logLevel`, `eventType`, `truncator`, and `truncatedEventsCounter` are 
all gone from the record.
   
   Truncation orchestration and the counter live in `FileEventLogger.append()` 
now, and the `logLevel` field in the on-disk JSON is emitted by the logger at 
write time rather than carried on the record.



-- 
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