本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
3.6KB

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