logs.proto 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.dataplex.v1;
  16. import "google/api/resource.proto";
  17. import "google/protobuf/duration.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "LogsProto";
  22. option java_package = "com.google.cloud.dataplex.v1";
  23. // The payload associated with Discovery data processing.
  24. message DiscoveryEvent {
  25. // The type of the event.
  26. enum EventType {
  27. // An unspecified event type.
  28. EVENT_TYPE_UNSPECIFIED = 0;
  29. // An event representing discovery configuration in effect.
  30. CONFIG = 1;
  31. // An event representing a metadata entity being created.
  32. ENTITY_CREATED = 2;
  33. // An event representing a metadata entity being updated.
  34. ENTITY_UPDATED = 3;
  35. // An event representing a metadata entity being deleted.
  36. ENTITY_DELETED = 4;
  37. // An event representing a partition being created.
  38. PARTITION_CREATED = 5;
  39. // An event representing a partition being updated.
  40. PARTITION_UPDATED = 6;
  41. // An event representing a partition being deleted.
  42. PARTITION_DELETED = 7;
  43. }
  44. // The type of the entity.
  45. enum EntityType {
  46. // An unspecified event type.
  47. ENTITY_TYPE_UNSPECIFIED = 0;
  48. // Entities representing structured data.
  49. TABLE = 1;
  50. // Entities representing unstructured data.
  51. FILESET = 2;
  52. }
  53. // Details about configuration events.
  54. message ConfigDetails {
  55. // A list of discovery configuration parameters in effect.
  56. // The keys are the field paths within DiscoverySpec.
  57. // Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference,
  58. // etc.
  59. map<string, string> parameters = 1;
  60. }
  61. // Details about the entity.
  62. message EntityDetails {
  63. // The name of the entity resource.
  64. // The name is the fully-qualified resource name.
  65. string entity = 1;
  66. // The type of the entity resource.
  67. EntityType type = 2;
  68. }
  69. // Details about the partition.
  70. message PartitionDetails {
  71. // The name to the partition resource.
  72. // The name is the fully-qualified resource name.
  73. string partition = 1;
  74. // The name to the containing entity resource.
  75. // The name is the fully-qualified resource name.
  76. string entity = 2;
  77. // The type of the containing entity resource.
  78. EntityType type = 3;
  79. // The locations of the data items (e.g., a Cloud Storage objects) sampled
  80. // for metadata inference.
  81. repeated string sampled_data_locations = 4;
  82. }
  83. // Details about the action.
  84. message ActionDetails {
  85. // The type of action.
  86. // Eg. IncompatibleDataSchema, InvalidDataFormat
  87. string type = 1;
  88. }
  89. // The log message.
  90. string message = 1;
  91. // The id of the associated lake.
  92. string lake_id = 2;
  93. // The id of the associated zone.
  94. string zone_id = 3;
  95. // The id of the associated asset.
  96. string asset_id = 4;
  97. // The data location associated with the event.
  98. string data_location = 5;
  99. // The type of the event being logged.
  100. EventType type = 10;
  101. // Additional details about the event.
  102. oneof details {
  103. // Details about discovery configuration in effect.
  104. ConfigDetails config = 20;
  105. // Details about the entity associated with the event.
  106. EntityDetails entity = 21;
  107. // Details about the partition associated with the event.
  108. PartitionDetails partition = 22;
  109. // Details about the action associated with the event.
  110. ActionDetails action = 23;
  111. }
  112. }
  113. // The payload associated with Job logs that contains events describing jobs
  114. // that have run within a Lake.
  115. message JobEvent {
  116. // The type of the job.
  117. enum Type {
  118. // Unspecified job type.
  119. TYPE_UNSPECIFIED = 0;
  120. // Spark jobs.
  121. SPARK = 1;
  122. // Notebook jobs.
  123. NOTEBOOK = 2;
  124. }
  125. // The completion status of the job.
  126. enum State {
  127. // Unspecified job state.
  128. STATE_UNSPECIFIED = 0;
  129. // Job successfully completed.
  130. SUCCEEDED = 1;
  131. // Job was unsuccessful.
  132. FAILED = 2;
  133. // Job was cancelled by the user.
  134. CANCELLED = 3;
  135. // Job was cancelled or aborted via the service executing the job.
  136. ABORTED = 4;
  137. }
  138. // The service used to execute the job.
  139. enum Service {
  140. // Unspecified service.
  141. SERVICE_UNSPECIFIED = 0;
  142. // Cloud Dataproc.
  143. DATAPROC = 1;
  144. }
  145. // The log message.
  146. string message = 1;
  147. // The unique id identifying the job.
  148. string job_id = 2;
  149. // The time when the job started running.
  150. google.protobuf.Timestamp start_time = 3;
  151. // The time when the job ended running.
  152. google.protobuf.Timestamp end_time = 4;
  153. // The job state on completion.
  154. State state = 5;
  155. // The number of retries.
  156. int32 retries = 6;
  157. // The type of the job.
  158. Type type = 7;
  159. // The service used to execute the job.
  160. Service service = 8;
  161. // The reference to the job within the service.
  162. string service_job = 9;
  163. }
  164. // These messages contain information about sessions within an environment.
  165. // The monitored resource is 'Environment'.
  166. message SessionEvent {
  167. // The type of the event.
  168. enum EventType {
  169. // An unspecified event type.
  170. EVENT_TYPE_UNSPECIFIED = 0;
  171. // Event when the session is assigned to a user.
  172. START = 1;
  173. // Event for stop of a session.
  174. STOP = 2;
  175. // Query events in the session.
  176. QUERY = 3;
  177. // Event for creation of a cluster. It is not yet assigned to a user.
  178. // This comes before START in the sequence
  179. CREATE = 4;
  180. }
  181. // Execution details of the query.
  182. message QueryDetail {
  183. // Query Execution engine.
  184. enum Engine {
  185. // An unspecified Engine type.
  186. ENGINE_UNSPECIFIED = 0;
  187. // Spark-sql engine is specified in Query.
  188. SPARK_SQL = 1;
  189. // BigQuery engine is specified in Query.
  190. BIGQUERY = 2;
  191. }
  192. // The unique Query id identifying the query.
  193. string query_id = 1;
  194. // The query text executed.
  195. string query_text = 2;
  196. // Query Execution engine.
  197. Engine engine = 3;
  198. // Time taken for execution of the query.
  199. google.protobuf.Duration duration = 4;
  200. // The size of results the query produced.
  201. int64 result_size_bytes = 5;
  202. // The data processed by the query.
  203. int64 data_processed_bytes = 6;
  204. }
  205. // The log message.
  206. string message = 1;
  207. // The information about the user that created the session. It will be the
  208. // email address of the user.
  209. string user_id = 2;
  210. // Unique identifier for the session.
  211. string session_id = 3;
  212. // The type of the event.
  213. EventType type = 4;
  214. // Additional information about the Query metadata.
  215. oneof detail {
  216. // The execution details of the query.
  217. QueryDetail query = 5;
  218. }
  219. // The status of the event.
  220. bool event_succeeded = 6;
  221. // If the session is associated with an Environment with fast startup enabled,
  222. // and was pre-created before being assigned to a user.
  223. bool fast_startup_enabled = 7;
  224. // The idle duration of a warm pooled session before it is assigned to user.
  225. google.protobuf.Duration unassigned_duration = 8;
  226. }