blob: 8981dc47577cedcbd5ac1fe11d698c3db24b5d45 [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001syntax = "proto2";
2option go_package = "log";
3
4package appengine;
5
6message LogServiceError {
7 enum ErrorCode {
8 OK = 0;
9 INVALID_REQUEST = 1;
10 STORAGE_ERROR = 2;
11 }
12}
13
14message UserAppLogLine {
15 required int64 timestamp_usec = 1;
16 required int64 level = 2;
17 required string message = 3;
18}
19
20message UserAppLogGroup {
21 repeated UserAppLogLine log_line = 2;
22}
23
24message FlushRequest {
25 optional bytes logs = 1;
26}
27
28message SetStatusRequest {
29 required string status = 1;
30}
31
32
33message LogOffset {
34 optional bytes request_id = 1;
35}
36
37message LogLine {
38 required int64 time = 1;
39 required int32 level = 2;
40 required string log_message = 3;
41}
42
43message RequestLog {
44 required string app_id = 1;
45 optional string module_id = 37 [default="default"];
46 required string version_id = 2;
47 required bytes request_id = 3;
48 optional LogOffset offset = 35;
49 required string ip = 4;
50 optional string nickname = 5;
51 required int64 start_time = 6;
52 required int64 end_time = 7;
53 required int64 latency = 8;
54 required int64 mcycles = 9;
55 required string method = 10;
56 required string resource = 11;
57 required string http_version = 12;
58 required int32 status = 13;
59 required int64 response_size = 14;
60 optional string referrer = 15;
61 optional string user_agent = 16;
62 required string url_map_entry = 17;
63 required string combined = 18;
64 optional int64 api_mcycles = 19;
65 optional string host = 20;
66 optional double cost = 21;
67
68 optional string task_queue_name = 22;
69 optional string task_name = 23;
70
71 optional bool was_loading_request = 24;
72 optional int64 pending_time = 25;
73 optional int32 replica_index = 26 [default = -1];
74 optional bool finished = 27 [default = true];
75 optional bytes clone_key = 28;
76
77 repeated LogLine line = 29;
78
79 optional bool lines_incomplete = 36;
80 optional bytes app_engine_release = 38;
81
82 optional int32 exit_reason = 30;
83 optional bool was_throttled_for_time = 31;
84 optional bool was_throttled_for_requests = 32;
85 optional int64 throttled_time = 33;
86
87 optional bytes server_name = 34;
88}
89
90message LogModuleVersion {
91 optional string module_id = 1 [default="default"];
92 optional string version_id = 2;
93}
94
95message LogReadRequest {
96 required string app_id = 1;
97 repeated string version_id = 2;
98 repeated LogModuleVersion module_version = 19;
99
100 optional int64 start_time = 3;
101 optional int64 end_time = 4;
102 optional LogOffset offset = 5;
103 repeated bytes request_id = 6;
104
105 optional int32 minimum_log_level = 7;
106 optional bool include_incomplete = 8;
107 optional int64 count = 9;
108
109 optional string combined_log_regex = 14;
110 optional string host_regex = 15;
111 optional int32 replica_index = 16;
112
113 optional bool include_app_logs = 10;
114 optional int32 app_logs_per_request = 17;
115 optional bool include_host = 11;
116 optional bool include_all = 12;
117 optional bool cache_iterator = 13;
118 optional int32 num_shards = 18;
119}
120
121message LogReadResponse {
122 repeated RequestLog log = 1;
123 optional LogOffset offset = 2;
124 optional int64 last_end_time = 3;
125}
126
127message LogUsageRecord {
128 optional string version_id = 1;
129 optional int32 start_time = 2;
130 optional int32 end_time = 3;
131 optional int64 count = 4;
132 optional int64 total_size = 5;
133 optional int32 records = 6;
134}
135
136message LogUsageRequest {
137 required string app_id = 1;
138 repeated string version_id = 2;
139 optional int32 start_time = 3;
140 optional int32 end_time = 4;
141 optional uint32 resolution_hours = 5 [default = 1];
142 optional bool combine_versions = 6;
143 optional int32 usage_version = 7;
144 optional bool versions_only = 8;
145}
146
147message LogUsageResponse {
148 repeated LogUsageRecord usage = 1;
149 optional LogUsageRecord summary = 2;
150}