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_r398239079
########## 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 { + monitoringInfo = append(monitoringInfo, + &ppb.MonitoringInfo{ + Urn: "beam:metric:user:v1", + Type: "beam:metrics:sum_int64:v1", + Labels: userLabels(l), + Payload: payload, + }) + } }, DistributionInt64: func(l metrics.Labels, count, sum, min, max int64) { - monitoringInfo = append(monitoringInfo, - &ppb.MonitoringInfo{ - Urn: "beam:metric:user_distribution", - Type: "beam:metrics:distribution_int_64", - Labels: userLabels(l), - Data: int64Distribution(count, sum, min, max), - }) + payload, err := int64Distribution(count, sum, min, max) + 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