Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / logging / v2 / log_entry.proto
1 // Copyright 2018 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 //
15
16 syntax = "proto3";
17
18 package google.logging.v2;
19
20 import "google/api/annotations.proto";
21 import "google/api/monitored_resource.proto";
22 import "google/logging/type/http_request.proto";
23 import "google/logging/type/log_severity.proto";
24 import "google/protobuf/any.proto";
25 import "google/protobuf/struct.proto";
26 import "google/protobuf/timestamp.proto";
27
28 option cc_enable_arenas = true;
29 option csharp_namespace = "Google.Cloud.Logging.V2";
30 option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
31 option java_multiple_files = true;
32 option java_outer_classname = "LogEntryProto";
33 option java_package = "com.google.logging.v2";
34 option php_namespace = "Google\\Cloud\\Logging\\V2";
35
36 // An individual entry in a log.
37 message LogEntry {
38   // Required. The resource name of the log to which this log entry belongs:
39   //
40   //     "projects/[PROJECT_ID]/logs/[LOG_ID]"
41   //     "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
42   //     "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
43   //     "folders/[FOLDER_ID]/logs/[LOG_ID]"
44   //
45   //  A project number may optionally be used in place of PROJECT_ID. The
46   //  project number is translated to its corresponding PROJECT_ID internally
47   //  and the `log_name` field will contain PROJECT_ID in queries and exports.
48   //
49   // `[LOG_ID]` must be URL-encoded within `log_name`. Example:
50   // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
51   // `[LOG_ID]` must be less than 512 characters long and can only include the
52   // following characters: upper and lower case alphanumeric characters,
53   // forward-slash, underscore, hyphen, and period.
54   //
55   // For backward compatibility, if `log_name` begins with a forward-slash, such
56   // as `/projects/...`, then the log entry is ingested as usual but the
57   // forward-slash is removed. Listing the log entry will not show the leading
58   // slash and filtering for a log name with a leading slash will never return
59   // any results.
60   string log_name = 12;
61
62   // Required. The primary monitored resource associated with this log entry.
63   // Example: a log entry that reports a database error would be
64   // associated with the monitored resource designating the particular
65   // database that reported the error.
66   google.api.MonitoredResource resource = 8;
67
68   // Optional. The log entry payload, which can be one of multiple types.
69   oneof payload {
70     // The log entry payload, represented as a protocol buffer.  Some
71     // Google Cloud Platform services use this field for their log
72     // entry payloads.
73     google.protobuf.Any proto_payload = 2;
74
75     // The log entry payload, represented as a Unicode string (UTF-8).
76     string text_payload = 3;
77
78     // The log entry payload, represented as a structure that is
79     // expressed as a JSON object.
80     google.protobuf.Struct json_payload = 6;
81   }
82
83   // Optional. The time the event described by the log entry occurred.
84   // This time is used to compute the log entry's age and to enforce
85   // the logs retention period. If this field is omitted in a new log
86   // entry, then Logging assigns it the current time.
87   // Timestamps have nanosecond accuracy, but trailing zeros in the fractional
88   // seconds might be omitted when the timestamp is displayed.
89   //
90   // Incoming log entries should have timestamps that are no more than
91   // the [logs retention period](/logging/quotas) in the past,
92   // and no more than 24 hours in the future. Log entries outside those time
93   // boundaries will not be available when calling `entries.list`, but
94   // those log entries can still be exported with
95   // [LogSinks](/logging/docs/api/tasks/exporting-logs).
96   google.protobuf.Timestamp timestamp = 9;
97
98   // Output only. The time the log entry was received by Logging.
99   google.protobuf.Timestamp receive_timestamp = 24;
100
101   // Optional. The severity of the log entry. The default value is
102   // `LogSeverity.DEFAULT`.
103   google.logging.type.LogSeverity severity = 10;
104
105   // Optional. A unique identifier for the log entry. If you provide a value,
106   // then Logging considers other log entries in the same project,
107   // with the same `timestamp`, and with the same `insert_id` to be duplicates
108   // which can be removed.  If omitted in new log entries, then
109   // Logging assigns its own unique identifier. The `insert_id` is also used
110   // to order log entries that have the same `timestamp` value.
111   string insert_id = 4;
112
113   // Optional. Information about the HTTP request associated with this
114   // log entry, if applicable.
115   google.logging.type.HttpRequest http_request = 7;
116
117   // Optional. A set of user-defined (key, value) data that provides additional
118   // information about the log entry.
119   map<string, string> labels = 11;
120
121   // Output only. Additional metadata about the monitored resource.
122   // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
123   // this field populated.
124   google.api.MonitoredResourceMetadata metadata = 25;
125
126   // Optional. Information about an operation associated with the log entry, if
127   // applicable.
128   LogEntryOperation operation = 15;
129
130   // Optional. Resource name of the trace associated with the log entry, if any.
131   // If it contains a relative resource name, the name is assumed to be relative
132   // to `//tracing.googleapis.com`. Example:
133   // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
134   string trace = 22;
135
136   // Optional. The span ID within the trace associated with the log entry.
137   // For Trace spans, this is the same format that the Trace
138   // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
139   // as <code>"000000000000004a"</code>.
140   string span_id = 27;
141
142   // Optional. The sampling decision of the trace associated with the log entry.
143   // True means that the trace resource name in the `trace` field was sampled
144   // for storage in a trace backend. False means that the trace was not sampled
145   // for storage when this log entry was written, or the sampling decision was
146   // unknown at the time. A non-sampled `trace` value is still useful as a
147   // request correlation identifier. The default is False.
148   bool trace_sampled = 30;
149
150   // Optional. Source code location information associated with the log entry,
151   // if any.
152   LogEntrySourceLocation source_location = 23;
153 }
154
155 // Additional information about a potentially long-running operation with which
156 // a log entry is associated.
157 message LogEntryOperation {
158   // Optional. An arbitrary operation identifier. Log entries with the
159   // same identifier are assumed to be part of the same operation.
160   string id = 1;
161
162   // Optional. An arbitrary producer identifier. The combination of
163   // `id` and `producer` must be globally unique.  Examples for `producer`:
164   // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
165   string producer = 2;
166
167   // Optional. Set this to True if this is the first log entry in the operation.
168   bool first = 3;
169
170   // Optional. Set this to True if this is the last log entry in the operation.
171   bool last = 4;
172 }
173
174 // Additional information about the source code location that produced the log
175 // entry.
176 message LogEntrySourceLocation {
177   // Optional. Source file name. Depending on the runtime environment, this
178   // might be a simple name or a fully-qualified name.
179   string file = 1;
180
181   // Optional. Line within the source file. 1-based; 0 indicates no line number
182   // available.
183   int64 line = 2;
184
185   // Optional. Human-readable name of the function or method being invoked, with
186   // optional context such as the class or package name. This information may be
187   // used in contexts such as the logs viewer, where a file and line number are
188   // less meaningful. The format can vary by language. For example:
189   // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
190   // (Python).
191   string function = 3;
192 }