Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-6505

Java SDK - Allow System Counters (which don't need MetricsContainer context)

Details

    • New Feature
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 3.0.0
    • java-fn-execution
    • None

    Description

      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.

      Attachments

        Activity

          People

            ajamato@google.com Alex Amato
            ajamato@google.com Alex Amato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: