[
https://issues.apache.org/jira/browse/BEAM-4374?focusedWorklogId=410555&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410555
]
ASF GitHub Bot logged work on BEAM-4374:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Mar/20 19:52
Start Date: 26/Mar/20 19:52
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #11184: [BEAM-4374]
Update protos related to MonitoringInfo.
URL: https://github.com/apache/beam/pull/11184#discussion_r398850622
##########
File path: model/pipeline/src/main/proto/metrics.proto
##########
@@ -52,38 +55,157 @@ message Annotation {
string value = 2;
}
-// Populated MonitoringInfoSpecs for specific URNs.
-// Indicating the required fields to be set.
-// SDKs and RunnerHarnesses can load these instances into memory and write a
-// validator or code generator to assist with populating and validating
-// MonitoringInfo protos.
+// A set of well known MonitoringInfo specifications.
message MonitoringInfoSpecs {
enum Enum {
- // TODO(BEAM-6926): Add the PTRANSFORM name as a required label after
- // upgrading the python SDK.
- USER_COUNTER = 0 [(monitoring_info_spec) = {
- urn: "beam:metric:user",
- type_urn: "beam:metrics:sum_int_64",
+ // Represents an integer counter where values are summed across bundles.
+ USER_SUM_INT64 = 0 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:sum_int64:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents a double counter where values are summed across bundles.
+ USER_SUM_DOUBLE = 1 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:sum_double:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents a distribution of an integer value where:
+ // - count: represents the number of values seen across all bundles
+ // - sum: represents the total of the value across all bundles
+ // - min: represents the smallest value seen across all bundles
+ // - max: represents the largest value seen across all bundles
+ USER_DISTRIBUTION_INT64 = 2 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:distribution_int64:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents a distribution of a double value where:
+ // - count: represents the number of values seen across all bundles
+ // - sum: represents the total of the value across all bundles
+ // - min: represents the smallest value seen across all bundles
+ // - max: represents the largest value seen across all bundles
+ USER_DISTRIBUTION_DOUBLE = 3 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:distribution_double:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents the latest seen integer value. The timestamp is used to
+ // provide an "ordering" over multiple values to determine which is the
+ // latest.
+ USER_LATEST_INT64 = 4 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:latest_int64:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents the latest seen double value. The timestamp is used to
+ // provide an "ordering" over multiple values to determine which is the
+ // latest.
+ USER_LATEST_DOUBLE = 5 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:latest_double:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents the largest set of integer values seen across bundles.
+ USER_TOP_N_INT64 = 6 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:top_n_int64:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents the largest set of double values seen across bundles.
+ USER_TOP_N_DOUBLE = 7 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:top_n_double:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // Represents the smallest set of integer values seen across bundles.
+ USER_BOTTOM_N_INT64 = 8 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:bottom_n_int64:v1",
required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
annotations: [{
key: "description",
- value: "URN utilized to report user numeric counters."
+ value: "URN utilized to report user metric."
}]
}];
- ELEMENT_COUNT = 1 [(monitoring_info_spec) = {
+ // Represents the smallest set of double values seen across bundles.
+ USER_BOTTOM_N_DOUBLE = 9 [(monitoring_info_spec) = {
+ urn: "beam:metric:user:v1",
+ type: "beam:metrics:bottom_n_double:v1",
+ required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"],
+ annotations: [{
+ key: "description",
+ value: "URN utilized to report user metric."
+ }]
+ }];
+
+ // General monitored state information which contains structured
information
+ // which does not fit into a typical metric format. See MonitoringTableData
+ // for more details.
+ USER_MONITORING_TABLE = 10 [(monitoring_info_spec) = {
Review comment:
Commented it out with a TODO and filed BEAM-9617
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 410555)
Time Spent: 30h 20m (was: 30h 10m)
> Update existing metrics in the FN API to use new Metric Schema
> --------------------------------------------------------------
>
> Key: BEAM-4374
> URL: https://issues.apache.org/jira/browse/BEAM-4374
> Project: Beam
> Issue Type: New Feature
> Components: beam-model
> Reporter: Alex Amato
> Priority: Major
> Time Spent: 30h 20m
> Remaining Estimate: 0h
>
> Update existing metrics to use the new proto and cataloging schema defined in:
> [_https://s.apache.org/beam-fn-api-metrics_]
> * Check in new protos
> * Define catalog file for metrics
> * Port existing metrics to use this new format, based on catalog
> names+metadata
--
This message was sent by Atlassian Jira
(v8.3.4#803005)