1- // Copyright 2020 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@ syntax = "proto3";
1616
1717package google.logging.v2 ;
1818
19+ import "google/api/annotations.proto" ;
1920import "google/api/field_behavior.proto" ;
2021import "google/api/monitored_resource.proto" ;
2122import "google/api/resource.proto" ;
@@ -24,8 +25,6 @@ import "google/logging/type/log_severity.proto";
2425import "google/protobuf/any.proto" ;
2526import "google/protobuf/struct.proto" ;
2627import "google/protobuf/timestamp.proto" ;
27- import "google/rpc/status.proto" ;
28- import "google/api/annotations.proto" ;
2928
3029option cc_enable_arenas = true ;
3130option csharp_namespace = "Google.Cloud.Logging.V2" ;
@@ -37,8 +36,6 @@ option php_namespace = "Google\\Cloud\\Logging\\V2";
3736option ruby_package = "Google::Cloud::Logging::V2" ;
3837
3938// An individual entry in a log.
40- //
41- //
4239message LogEntry {
4340 option (google.api.resource ) = {
4441 type : "logging.googleapis.com/Log"
@@ -62,12 +59,13 @@ message LogEntry {
6259 //
6360 // `[LOG_ID]` must be URL-encoded within `log_name`. Example:
6461 // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
62+ //
6563 // `[LOG_ID]` must be less than 512 characters long and can only include the
6664 // following characters: upper and lower case alphanumeric characters,
6765 // forward-slash, underscore, hyphen, and period.
6866 //
6967 // For backward compatibility, if `log_name` begins with a forward-slash, such
70- // as `/projects/...`, then the log entry is ingested as usual but the
68+ // as `/projects/...`, then the log entry is ingested as usual, but the
7169 // forward-slash is removed. Listing the log entry will not show the leading
7270 // slash and filtering for a log name with a leading slash will never return
7371 // any results.
@@ -126,7 +124,7 @@ message LogEntry {
126124 // de-duplication in the export of logs.
127125 //
128126 // If the `insert_id` is omitted when writing a log entry, the Logging API
129- // assigns its own unique identifier in this field.
127+ // assigns its own unique identifier in this field.
130128 //
131129 // In queries, the `insert_id` is also used to order log entries that have
132130 // the same `log_name` and `timestamp` values.
@@ -136,8 +134,20 @@ message LogEntry {
136134 // applicable.
137135 google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior ) = OPTIONAL ];
138136
139- // Optional. A set of user-defined (key, value) data that provides additional
140- // information about the log entry.
137+ // Optional. A map of key, value pairs that provides additional information about the
138+ // log entry. The labels can be user-defined or system-defined.
139+ //
140+ // User-defined labels are arbitrary key, value pairs that you can use to
141+ // classify logs.
142+ //
143+ // System-defined labels are defined by GCP services for platform logs.
144+ // They have two components - a service namespace component and the
145+ // attribute name. For example: `compute.googleapis.com/resource_name`.
146+ //
147+ // Cloud Logging truncates label keys that exceed 512 B and label
148+ // values that exceed 64 KB upon their associated log entry being
149+ // written. The truncation is indicated by an ellipsis at the
150+ // end of the character string.
141151 map <string , string > labels = 11 [(google.api.field_behavior ) = OPTIONAL ];
142152
143153 // Optional. Information about an operation associated with the log entry, if
@@ -168,6 +178,10 @@ message LogEntry {
168178
169179 // Optional. Source code location information associated with the log entry, if any.
170180 LogEntrySourceLocation source_location = 23 [(google.api.field_behavior ) = OPTIONAL ];
181+
182+ // Optional. Information indicating this LogEntry is part of a sequence of multiple log
183+ // entries split from a single LogEntry.
184+ LogSplit split = 35 [(google.api.field_behavior ) = OPTIONAL ];
171185}
172186
173187// Additional information about a potentially long-running operation with which
@@ -208,3 +222,21 @@ message LogEntrySourceLocation {
208222 // (Python).
209223 string function = 3 [(google.api.field_behavior ) = OPTIONAL ];
210224}
225+
226+ // Additional information used to correlate multiple log entries. Used when a
227+ // single LogEntry would exceed the Google Cloud Logging size limit and is
228+ // split across multiple log entries.
229+ message LogSplit {
230+ // A globally unique identifier for all log entries in a sequence of split log
231+ // entries. All log entries with the same |LogSplit.uid| are assumed to be
232+ // part of the same sequence of split log entries.
233+ string uid = 1 ;
234+
235+ // The index of this LogEntry in the sequence of split log entries. Log
236+ // entries are given |index| values 0, 1, ..., n-1 for a sequence of n log
237+ // entries.
238+ int32 index = 2 ;
239+
240+ // The total number of log entries that the original LogEntry was split into.
241+ int32 total_splits = 3 ;
242+ }
0 commit comments