1/*
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 perfetto.protos;
20
21message TrackEventConfig {
22  // The following fields define the set of enabled trace categories. Each list
23  // item is a glob.
24  //
25  // To determine if category is enabled, it is checked against the filters in
26  // the following order:
27  //
28  //   1. Exact matches in enabled categories.
29  //   2. Exact matches in enabled tags.
30  //   3. Exact matches in disabled categories.
31  //   4. Exact matches in disabled tags.
32  //   5. Pattern matches in enabled categories.
33  //   6. Pattern matches in enabled tags.
34  //   7. Pattern matches in disabled categories.
35  //   8. Pattern matches in disabled tags.
36  //
37  // If none of the steps produced a match, the category is enabled by default.
38  //
39  // Examples:
40  //
41  //  - To enable all non-slow/debug categories:
42  //
43  //       No configuration needed, happens by default.
44  //
45  //  - To enable a specific category:
46  //
47  //       disabled_categories = ["*"]
48  //       enabled_categories = ["my_category"]
49  //
50  //  - To enable only categories with a specific tag:
51  //
52  //       disabled_tags = ["*"]
53  //       enabled_tags = ["my_tag"]
54  //
55
56  // Default: []
57  repeated string disabled_categories = 1;
58
59  // Default: []
60  repeated string enabled_categories = 2;
61
62  // Default: [“slow”, “debug”]
63  repeated string disabled_tags = 3;
64
65  // Default: []
66  repeated string enabled_tags = 4;
67}
68