lostluck commented on a change in pull request #11184: [WIP][BEAM-4374] Update 
protos related to MonitoringInfo.
URL: https://github.com/apache/beam/pull/11184#discussion_r398239127
 
 

 ##########
 File path: sdks/go/pkg/beam/core/runtime/harness/monitoring.go
 ##########
 @@ -80,36 +84,40 @@ func monitoring(p *exec.Plan) (*fnpb.Metrics, 
[]*ppb.MonitoringInfo) {
        var monitoringInfo []*ppb.MonitoringInfo
        metrics.Extractor{
                SumInt64: func(l metrics.Labels, v int64) {
-                       monitoringInfo = append(monitoringInfo,
-                               &ppb.MonitoringInfo{
-                                       Urn:    "beam:metric:user",
-                                       Type:   "beam:metrics:sum_int_64",
-                                       Labels: userLabels(l),
-                                       Data:   int64Counter(v),
-                               })
+                       payload, err := int64Counter(v)
+                       if err != nil {
 
 Review comment:
   Error case reversal. 
   Consider 
   ```
   if err != nil {
     panic(err)
   }
   // ...actual contents of the block. 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


With regards,
Apache Git Services

Reply via email to