Naireen commented on code in PR #33503:
URL: https://github.com/apache/beam/pull/33503#discussion_r1986936703
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingStepMetricsContainer.java:
##########
@@ -402,12 +387,17 @@ Iterable<PerStepNamespaceMetrics>
extractPerWorkerMetricUpdates() {
counters.put(k, val);
});
- perWorkerGauges.forEach(
+ gauges.forEach(
(k, v) -> {
- Long val = v.getCumulative().value();
- gauges.put(k, val);
- v.reset();
+ // Check if metric name has the per worker label set
+ if (k.getLabels().containsKey("PER_WORKER_METRIC")
Review Comment:
Oh that makes sense, so we don't have to check each time we process an
update.
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingStepMetricsContainer.java:
##########
@@ -402,12 +387,17 @@ Iterable<PerStepNamespaceMetrics>
extractPerWorkerMetricUpdates() {
counters.put(k, val);
});
- perWorkerGauges.forEach(
+ gauges.forEach(
(k, v) -> {
- Long val = v.getCumulative().value();
- gauges.put(k, val);
- v.reset();
+ // Check if metric name has the per worker label set
+ if (k.getLabels().containsKey("PER_WORKER_METRIC")
Review Comment:
Obsolete after code changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]