Repository navigation
Publish process-wide metrics in Flink runner - #182
Merged
cirquare merged 1 commit intoOct 6, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Publish Beam 2.75 process-wide metrics through the Flink runner's metric bridge.
FlinkMetricContainerBasenow owns a process-wideMetricsContainerImpl, installs it via Beam's existingMetricsEnvironment.setProcessWideContainer(...), and forwards that container's counters, gauges, and distributions to Flink metrics duringupdateMetrics(...).This intentionally uses Beam 2.75's process-wide metrics model instead of restoring the old LI global-container API. Ordinary unscoped public
Metrics.*calls from unmanaged callback threads remain unchanged and are not implicitly promoted to process-wide metrics.Testing Done
./gradlew :runners:flink:1.20:test --tests org.apache.beam.runners.flink.metrics.FlinkMetricContainerTest.testProcessWideMetrics --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21)./gradlew :runners:flink:1.20:test --tests org.apache.beam.runners.flink.metrics.FlinkMetricContainerTest.testProcessWideMetrics --tests org.apache.beam.runners.flink.metrics.FlinkMetricContainerTest.testProcessWideMetricsArePublishedOnlyByOwningContainer --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21)./gradlew :runners:flink:1.20:test :runners:flink:2.2:test --tests org.apache.beam.runners.flink.metrics.FlinkMetricContainerTest --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21)./gradlew :runners:flink:1.20:build :runners:flink:2.2:build --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21)./gradlew :runners:flink:1.19:build :runners:flink:2.0:build :runners:flink:2.1:build --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21)flink-li-frameworkmetrics reporter compatibility tests:./gradlew :flink-li-metrics:test --tests com.linkedin.flink.metrics.reporter.TestOpenTelemetryMetricReporter.testNotifyOfAddedMetricCounter --tests com.linkedin.flink.metrics.reporter.TestOpenTelemetryMetricReporter.testNotifyOfAddedMetricGauge --tests com.linkedin.flink.metrics.reporter.TestOpenTelemetryMetricRegistry.testRegisterCounter --tests com.linkedin.flink.metrics.reporter.TestOpenTelemetryMetricRegistry.testRegisterGaugegit diff --check./gradlew build --no-daemon -Dorg.gradle.java.home=$(/usr/libexec/java_home -v 11.0.21), but it is blocked before tests by the local missing Go/Prism prerequisite::runners:prism:goPreparerequires Go > 1.16.