Skip to content

[FLINK-40294][table-planner] Instrument async scalar and table UDF calls with metrics (fork reference) - #10

Open
weiqingy wants to merge 1 commit into
flink-38071-pr2-syncfrom
flink-38071-pr3-async
Open

[FLINK-40294][table-planner] Instrument async scalar and table UDF calls with metrics (fork reference)#10
weiqingy wants to merge 1 commit into
flink-38071-pr2-syncfrom
flink-38071-pr3-async

Conversation

@weiqingy

@weiqingy weiqingy commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR for reviewer convenience. Not for merge here, and not yet opened upstream.

Part of the FLIP-485 stack (FLINK-38071). It will be opened against apache:master once PR-2 merges.

Based on flink-38071-pr2-sync, so the diff shows only this step's changes: async scalar and table instrumentation. The sampling decision and start timestamp are captured at dispatch on the task thread; the elapsed time and any exceptional completion are recorded at completion on the callback thread, in DelegatingAsyncResultFuture and DelegatingAsyncTableResultFuture.

Sub-task: FLINK-40294

…lls with metrics

Extend the FLIP-485 UDF metrics to async scalar and table user-defined
functions. The sampling decision and the start timestamp are captured at
dispatch on the task thread; the elapsed time and any exceptional completion
are recorded at completion on the callback thread, in the per-invocation
DelegatingAsyncResultFuture and DelegatingAsyncTableResultFuture. Both writes
happen before the completion callback is registered, establishing a
happens-before edge to the callback thread; the histogram is synchronized and
the exception counter is thread-safe.

udfProcessingTime for an async function therefore spans the full dispatch to
completion, not just the synchronous hand-off. As on the sync path, the
instrumentation is emitted at code generation only when
table.exec.udf-metric-enabled is true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant