Alex Amato created BEAM-6505:
--------------------------------

             Summary: Java SDK - Allow System Counters (which don't need 
MetricsContainer context)
                 Key: BEAM-6505
                 URL: https://issues.apache.org/jira/browse/BEAM-6505
             Project: Beam
          Issue Type: New Feature
          Components: java-fn-execution
            Reporter: Alex Amato
            Assignee: Alex Amato


See the comment added for this issue in ElementCountFnDataReceiver.java

The method used to create these metrics relies on the currently in scope 
metrics container, though we should use the same metrics container every time 
this code is invoked instead. There is no need to use the current scoped metric 
container, which only offers the main benefit to user counters, by attaching 
the PTransform name to the metrics. In this case the metric does not need the 
currently scoped PTransform name, since the code is labelling the metrics with 
the pcollection, and similar cases can manually attach the ptransform name 
(i.e. for execution time metrics).

We can make the static method LabelledMetrics.counter(metricName) obtain a 
consistent metric container instead of looking for the currently scoped metric 
container.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to