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_r398238942
 
 

 ##########
 File path: sdks/go/pkg/beam/core/runtime/harness/monitoring.go
 ##########
 @@ -126,15 +134,18 @@ func monitoring(p *exec.Plan) (*fnpb.Metrics, 
[]*ppb.MonitoringInfo) {
                        },
                }
                // Monitoring info version.
-               monitoringInfo = append(monitoringInfo,
-                       &ppb.MonitoringInfo{
-                               Urn:  "beam:metric:element_count:v1",
-                               Type: "beam:metrics:sum_int_64",
-                               Labels: map[string]string{
-                                       "PCOLLECTION": snapshot.PID,
-                               },
-                               Data: int64Counter(snapshot.Count),
-                       })
+               payload, err := int64Counter(snapshot.Count)
+               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