Skip to content

[FLINK-40293][table] Add UDF metric config options and instrument sync scalar and table UDF calls (fork reference) - #9

Open
weiqingy wants to merge 1 commit into
flink-38071-pr1-helperfrom
flink-38071-pr2-sync
Open

[FLINK-40293][table] Add UDF metric config options and instrument sync scalar and table UDF calls (fork reference)#9
weiqingy wants to merge 1 commit into
flink-38071-pr1-helperfrom
flink-38071-pr2-sync

Conversation

@weiqingy

@weiqingy weiqingy commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR for reviewer convenience. Not for merge here.

Part of the FLIP-485 stack (FLINK-38071). The upstream PR is apache/flink#28879.

This copy is based on flink-38071-pr1-helper rather than master, so the diff shows only this step's changes (config options + sync instrumentation). The upstream PR must target apache:master, so until PR-1 merges its diff also includes the UdfMetrics commit.

Sub-task: FLINK-40293

…c scalar and table UDF calls

Introduce two opt-in configuration options for FLIP-485 UDF metrics:
table.exec.udf-metric-enabled (default false) and
table.exec.udf-metric.sample-interval (default 100).

Wrap the generated eval call site for sync scalar and table user-defined
functions (via the BridgingSqlFunction stack) with sampled udfProcessingTime
timing and udfExceptionCount counting, using the UdfMetrics helper registered
on the operator metric group under udf.<udfName>. Instrumentation is emitted
only when table.exec.udf-metric-enabled is true; the generated operator is
byte-identical when disabled. One shared handle is registered per (operator,
udfName). Lookup-join, ML-predict, vector-search, legacy CallGens, and
PROCESS_TABLE functions are not metered.
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