diff options
| -rw-r--r-- | cmds/statsd/src/stats_log.proto | 50 | ||||
| -rw-r--r-- | cmds/statsd/src/statsd_config.proto | 35 |
2 files changed, 79 insertions, 6 deletions
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto index 29cd94b21b1b..ec91509aaf40 100644 --- a/cmds/statsd/src/stats_log.proto +++ b/cmds/statsd/src/stats_log.proto @@ -69,6 +69,34 @@ message DurationMetricData { repeated DurationBucketInfo bucket_info = 2; } +message ValueBucketInfo { + optional int64 start_bucket_nanos = 1; + + optional int64 end_bucket_nanos = 2; + + optional int64 value = 3; +} + +message ValueMetricData { + repeated KeyValuePair dimension = 1; + + repeated ValueBucketInfo bucket_info = 2; +} + +message GaugeBucketInfo { + optional int64 start_bucket_nanos = 1; + + optional int64 end_bucket_nanos = 2; + + optional int64 gauge = 3; +} + +message GaugeMetricData { + repeated KeyValuePair dimension = 1; + + repeated GaugeBucketInfo bucket_info = 2; +} + message UidMapping { message AppInfo { optional string app = 1; @@ -83,7 +111,7 @@ message UidMapping { message Change { optional bool deletion = 1; - optional int64 timestamp = 2; + optional int64 timestamp_nanos = 2; optional string app = 3; optional int32 uid = 4; @@ -108,9 +136,29 @@ message StatsLogReport { message DurationMetricDataWrapper { repeated DurationMetricData data = 1; } + message ValueMetricDataWrapper { + repeated ValueMetricData data = 1; + } + message GaugeMetricDataWrapper { + repeated GaugeMetricData data = 1; + } oneof data { EventMetricDataWrapper event_metrics = 4; CountMetricDataWrapper count_metrics = 5; DurationMetricDataWrapper duration_metrics = 6; + ValueMetricDataWrapper value_metrics = 7; + GaugeMetricDataWrapper gauge_metrics = 8; + } +} + +message ConfigMetricsReport { + message ConfigKey { + optional int32 uid = 1; + optional string name = 2; } + optional ConfigKey config_key = 1; + + repeated StatsLogReport metrics = 2; + + optional UidMapping uid_map = 3; } diff --git a/cmds/statsd/src/statsd_config.proto b/cmds/statsd/src/statsd_config.proto index 113ac62699d2..a4d2421b16d3 100644 --- a/cmds/statsd/src/statsd_config.proto +++ b/cmds/statsd/src/statsd_config.proto @@ -168,7 +168,28 @@ message DurationMetric { optional Bucket bucket = 8; - repeated EventConditionLink links = 9; + repeated Alert alerts = 9; + + repeated EventConditionLink links = 10; + +} + +message GaugeMetric { + optional int64 metric_id = 1; + + optional string what = 2; + + optional int32 gauge_field = 3; + + optional string condition = 4; + + repeated KeyMatcher dimension = 5; + + optional Bucket bucket = 6; + + repeated Alert alerts = 7; + + repeated EventConditionLink links = 8; } message ValueMetric { @@ -184,6 +205,10 @@ message ValueMetric { optional Bucket bucket = 6; + repeated Alert alerts = 7; + + repeated EventConditionLink links = 8; + enum Operation { SUM_DIFF = 1; MIN_DIFF = 2; @@ -194,14 +219,14 @@ message ValueMetric { FIRST = 7; LAST = 8; } - optional Operation operation = 7; + optional Operation operation = 9 [default = SUM]; } message EventConditionLink { - optional string condition = 1; + optional string condition = 1; - repeated KeyMatcher key_in_main = 2; - repeated KeyMatcher key_in_condition = 3; + repeated KeyMatcher key_in_main = 2; + repeated KeyMatcher key_in_condition = 3; }; message StatsdConfig { |