1/* 2 * Copyright (C) 2018 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"; 18option java_multiple_files = true; 19 20package android.os; 21 22// This field contains internal metadata associated with an incident report, 23// such as the section ids and privacy policy specs from caller as well as how long 24// and how many bytes a section takes, etc. 25message IncidentMetadata { 26 27 // The id of the incident report. 28 optional int64 report_id = 1; 29 30 // The sequence number of the report. 31 optional int32 sequence_number = 2; 32 33 // privacy level of the incident report. 34 enum Destination { 35 AUTOMATIC = 0; 36 EXPLICIT = 1; 37 LOCAL = 2; 38 } 39 optional Destination dest = 3; 40 41 optional int32 request_size = 4; 42 43 optional bool use_dropbox = 5; 44 45 // stats of each section taken in this incident report. 46 message SectionStats { 47 // section id. 48 optional int32 id = 1; 49 // if the section is successfully taken. 50 optional bool success = 2; 51 // number of bytes in the report after filtering. 52 optional int32 report_size_bytes = 3; 53 // the total duration to execute the section. 54 optional int64 exec_duration_ms = 4; 55 56 // number of bytes dumped from the section directly. 57 optional int32 dump_size_bytes = 5; 58 // duration of the dump takes. 59 optional int64 dump_duration_ms = 6; 60 // true if the section timed out. 61 optional bool timed_out = 7; 62 // true if the section is truncated. 63 optional bool is_truncated = 8; 64 65 // Next Tag: 9 66 } 67 repeated SectionStats sections = 6; 68 69 // Next Tag: 7 70} 71 72