Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/dataframe/transforms_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def test_rename(self):
class FusionTest(unittest.TestCase):
@staticmethod
def fused_stages(p):
return p.result.metrics().query(
return p.result.monitoring_metrics().query(
metrics.MetricsFilter().with_name(
fn_runner.FnApiRunner.NUM_FUSED_STAGES_COUNTER)
)['counters'][0].result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,11 @@ def run_stages(self,
stage_context.components.environments, self._provision_info)
pipeline_metrics = MetricsContainer('')
pipeline_metrics.get_counter(
MetricName(str(type(self)),
self.NUM_FUSED_STAGES_COUNTER)).update(len(stages))
MetricName(
str(type(self)),
self.NUM_FUSED_STAGES_COUNTER,
urn='internal:' + self.NUM_FUSED_STAGES_COUNTER)).update(
len(stages))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess internal: is a concept already defined somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's some inconsistencies here with "user" counters requiring a name and namespace and "non-user" counters using the first component of the urn as a namespace and the rest as the name.

monitoring_infos_by_stage = {}

runner_execution_context = execution.FnApiRunnerExecutionContext(
Expand Down