Skip to content

Conversation

@Sxnan
Copy link
Contributor

@Sxnan Sxnan commented Jan 16, 2026

Linked issue: #444

Purpose of change

  • Add a config option to set the event log output path.
  • Refine Python event logging format: use JSON eventString from Python, remove wrapper context/sourceTimestamp in logs, and emit a flattened { timestamp, event } structure.

Tests

  • org.apache.flink.agents.runtime.eventlog.EventLogRecordJsonSerdeTest
  • python/flink_agents/e2e_tests/e2e_tests_integration/python_event_logging_test.py

API

  • No public API changes. (Event log output format changed.)

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

# Conflicts:
#	runtime/src/test/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperatorTest.java
@github-actions github-actions bot added priority/major Default priority of the PR or issue. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. doc-included Your PR already contains the necessary documentation updates. labels Jan 16, 2026
@Sxnan Sxnan changed the title [log] Add config to set the event log path [log] Improve event logging Jan 16, 2026
@Sxnan
Copy link
Contributor Author

Sxnan commented Jan 16, 2026

@xintongsong Could you review this PR?

@Sxnan Sxnan requested a review from xintongsong January 16, 2026 13:28
Copy link
Contributor

@xintongsong xintongsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes LGTM. I just wonder, can we also control the order of event fields in the printed logs?

This is what we get now:

{"timestamp":"2026-01-17T03:16:29.500129Z","event":{"id":"304c6961-a8cd-47cc-b31a-cbeed2a8e630","attributes":{},"input":"test input data","eventType":"org.apache.flink.agents.api.InputEvent"}}

It might be nicer to always have the type & id in the beginning.

{"timestamp":"2026-01-17T03:16:29.500129Z","event":{"eventType":"org.apache.flink.agents.api.InputEvent","id":"304c6961-a8cd-47cc-b31a-cbeed2a8e630","attributes":{},"input":"test input data"}}

Copy link
Contributor

@xintongsong xintongsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xintongsong xintongsong merged commit 893e523 into apache:main Jan 17, 2026
38 of 40 checks passed
@Sxnan Sxnan deleted the eventlog-improve branch January 17, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-included Your PR already contains the necessary documentation updates. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants