-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka metrics #32402
Kafka metrics #32402
Conversation
a1ab6c0
to
627ad7c
Compare
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
R: @scwhittle |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify in PR description that this is for Dataflow V1 runner?
Adding John as he is more familiar with BeamIO in general and may have suggestions on monitoring.
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/beam/runners/dataflow/worker/MetricsToPerStepNamespaceMetricsConverter.java
Show resolved
Hide resolved
...w-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/StageInfo.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaMetrics.java
Show resolved
Hide resolved
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java
Show resolved
Hide resolved
[Dataflow Streaming] Use isolated windmill streams based on job settings (apache#32503)
ba9250c
to
dc0900a
Compare
dc0900a
to
0929e39
Compare
0929e39
to
d90b748
Compare
Run Java PreCommit |
@Naireen @johnjcasey The changes introduced in this PR assume that a single |
@@ -54,6 +54,7 @@ def sdk_provided_project_dependencies = [ | |||
":runners:google-cloud-dataflow-java", | |||
":sdks:java:extensions:avro", | |||
":sdks:java:extensions:google-cloud-platform-core", | |||
":sdks:java:io:kafka", // For metric propagation into worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad code coupling. Fetching static name isn't sufficient justification to introduce this mandatory dependency to Dataflow worker jar. This also makes confluent repository mandatory for user project.
@@ -668,6 +669,10 @@ public static void main(String[] args) throws Exception { | |||
enableBigQueryMetrics(); | |||
} | |||
|
|||
if (DataflowRunner.hasExperiment(options, "enable_kafka_metrics")) { | |||
KafkaSinkMetrics.setSupportKafkaMetrics(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of setting IO flags in worker, one can utilize the JvmInitializer.runBeforeProcessing mechanism that is introduce a JvmInitializer implementation in org.apache.beam.sdk.io.kafka to initialize the flags on worker. This avoids the need of kafka dependency
Add per worker metric for Kafka poll latency. This is specifically for Dataflow V1 runner.
Next steps would be to extend this to add latency for other RPC calls.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.