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


##########
runtime/src/main/java/org/apache/flink/agents/runtime/eventlog/EventLogRecord.java:
##########
@@ -31,23 +33,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;
+    private final transient JsonTruncator truncator;
+    private final transient Counter truncatedEventsCounter;

Review Comment:
   Thanks for the concrete sketch — followed it in `c4596bc`, and combined it 
with Xintong's broader concern to drop `logLevel` from `EventLogRecord` as 
well, since it shares the same "not part of the event content" character as the 
truncator. `EventLogRecord` is now a pure `(context, event)` carrier, and 
`FileEventLogger.append()` owns truncation orchestration plus injection of the 
`logLevel` field on the way out.
   
   The on-disk JSON layout is unchanged — entries still serialize as 
`timestamp, logLevel, eventType, event` — and the deserializer silently ignores 
any `logLevel` field present in older log files, so existing logs keep 
replaying without changes.
   



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