blob: e00fe33655ca9711f88ee68171052265049fff84 [file] [log] [blame]
Jeffrey Huang8a617e02020-03-19 15:38:43 -07001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.os.statsd.metadata;
20
21message ConfigKey {
22 optional int64 config_id = 1;
23 optional int32 uid = 2;
24}
25
26message Field {
27 optional int32 tag = 1;
28 optional int32 field = 2;
29}
30
31message FieldValue {
32 optional Field field = 1;
33 oneof value {
34 int32 value_int = 2;
35 int64 value_long = 3;
36 float value_float = 4;
37 double value_double = 5;
38 string value_str = 6;
39 bytes value_storage = 7;
40 }
41}
42
43message MetricDimensionKey {
44 repeated FieldValue dimension_key_in_what = 1;
45 repeated FieldValue state_values_key = 2;
46}
47
48message AlertMetadata {
49 optional int64 alert_id = 1;
50 // The earliest time the alert can be fired again in wall clock time.
51 optional int32 last_refractory_ends_sec = 2;
52 optional MetricDimensionKey dimension_key = 3;
53}
54
55// All metadata for a config in statsd
56message StatsMetadata {
57 optional ConfigKey config_key = 1;
58 repeated AlertMetadata alert_metadata = 2;
59}
60
61message StatsMetadataList {
62 repeated StatsMetadata stats_metadata = 1;
63}