[ 
https://issues.apache.org/jira/browse/BEAM-6138?focusedWorklogId=193152&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193152
 ]

ASF GitHub Bot logged work on BEAM-6138:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Feb/19 02:05
            Start Date: 01/Feb/19 02:05
    Worklog Time Spent: 10m 
      Work Description: ryan-williams commented on pull request #7624: 
[BEAM-6138] Set the PTransform name on Java SDK User counters
URL: https://github.com/apache/beam/pull/7624#discussion_r252911665
 
 

 ##########
 File path: 
runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/MetricsContainerImpl.java
 ##########
 @@ -158,6 +158,11 @@ private MonitoringInfo 
counterUpdateToMonitoringInfo(MetricUpdate<Long> metricUp
       builder.setUrnForUserMetric(
           metricUpdate.getKey().metricName().getNamespace(),
           metricUpdate.getKey().metricName().getName());
+      String stepName = "";
+      if (metricUpdate.getKey().stepName() != null) {
+        stepName = metricUpdate.getKey().stepName();
+      }
+      builder.setPTransformLabel(stepName);
 
 Review comment:
   Isn't a step-name of `null` a sentinel that indicates omitting the 
PTransformLabel altogether?
   
   Seems like you are going out of your way to set it to `""` here, but I was 
thinking the contract was `null` ⟺ [PCollection-scoped metric]
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 193152)

> Add User Metric Support to Java SDK
> -----------------------------------
>
>                 Key: BEAM-6138
>                 URL: https://issues.apache.org/jira/browse/BEAM-6138
>             Project: Beam
>          Issue Type: New Feature
>          Components: java-fn-execution
>            Reporter: Alex Amato
>            Assignee: Alex Amato
>            Priority: Major
>          Time Spent: 6.5h
>  Remaining Estimate: 0h
>




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

Reply via email to