[
https://issues.apache.org/jira/browse/BEAM-6138?focusedWorklogId=193581&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193581
]
ASF GitHub Bot logged work on BEAM-6138:
----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Feb/19 00:35
Start Date: 02/Feb/19 00:35
Worklog Time Spent: 10m
Work Description: ajamato 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_r253203072
##########
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:
You can't actually set the proto value to null, it will crash the program.
This is an invalid input case though, since all user counters must be scoped to
their step. I removed the test case which caused me to add this in the first
place. If this occurs, we should drop the metric. I'll add a test for that too
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 193581)
Time Spent: 7h (was: 6h 50m)
> 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: 7h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)