google-cloud-logging-v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-logging-v2.rb +21 -0
- data/lib/google/cloud/logging/v2.rb +37 -0
- data/lib/google/cloud/logging/v2/config_service.rb +49 -0
- data/lib/google/cloud/logging/v2/config_service/client.rb +1723 -0
- data/lib/google/cloud/logging/v2/config_service/credentials.rb +54 -0
- data/lib/google/cloud/logging/v2/config_service/paths.rb +413 -0
- data/lib/google/cloud/logging/v2/logging_service.rb +49 -0
- data/lib/google/cloud/logging/v2/logging_service/client.rb +826 -0
- data/lib/google/cloud/logging/v2/logging_service/credentials.rb +55 -0
- data/lib/google/cloud/logging/v2/logging_service/paths.rb +154 -0
- data/lib/google/cloud/logging/v2/metrics_service.rb +49 -0
- data/lib/google/cloud/logging/v2/metrics_service/client.rb +726 -0
- data/lib/google/cloud/logging/v2/metrics_service/credentials.rb +55 -0
- data/lib/google/cloud/logging/v2/metrics_service/paths.rb +64 -0
- data/lib/google/cloud/logging/v2/version.rb +28 -0
- data/lib/google/logging/type/http_request_pb.rb +38 -0
- data/lib/google/logging/type/log_severity_pb.rb +31 -0
- data/lib/google/logging/v2/log_entry_pb.rb +62 -0
- data/lib/google/logging/v2/logging_config_pb.rb +176 -0
- data/lib/google/logging/v2/logging_config_services_pb.rb +113 -0
- data/lib/google/logging/v2/logging_metrics_pb.rb +75 -0
- data/lib/google/logging/v2/logging_metrics_services_pb.rb +53 -0
- data/lib/google/logging/v2/logging_pb.rb +83 -0
- data/lib/google/logging/v2/logging_services_pb.rb +65 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/distribution.rb +225 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/label.rb +49 -0
- data/proto_docs/google/api/metric.rb +203 -0
- data/proto_docs/google/api/monitored_resource.rb +137 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/logging/type/http_request.rb +95 -0
- data/proto_docs/google/logging/type/log_severity.rb +71 -0
- data/proto_docs/google/logging/v2/log_entry.rb +203 -0
- data/proto_docs/google/logging/v2/logging.rb +303 -0
- data/proto_docs/google/logging/v2/logging_config.rb +735 -0
- data/proto_docs/google/logging/v2/logging_metrics.rb +256 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +231 -0
@@ -0,0 +1,247 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/\\{project}/topics/\\{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/\\{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name, such as 'projects' for
|
187
|
+
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
|
+
# field in k8s CRD spec
|
189
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
# @!attribute [rw] singular
|
191
|
+
# @return [::String]
|
192
|
+
# The same concept of the `singular` field in k8s CRD spec
|
193
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
|
+
class ResourceDescriptor
|
196
|
+
include ::Google::Protobuf::MessageExts
|
197
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
|
199
|
+
# A description of the historical or future-looking state of the
|
200
|
+
# resource pattern.
|
201
|
+
module History
|
202
|
+
# The "unset" value.
|
203
|
+
HISTORY_UNSPECIFIED = 0
|
204
|
+
|
205
|
+
# The resource originally had one pattern and launched as such, and
|
206
|
+
# additional patterns were added later.
|
207
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
208
|
+
|
209
|
+
# The resource has one pattern, but the API owner expects to add more
|
210
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
211
|
+
# that from being necessary once there are multiple patterns.)
|
212
|
+
FUTURE_MULTI_PATTERN = 2
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Defines a proto annotation that describes a string field that refers to
|
217
|
+
# an API resource.
|
218
|
+
# @!attribute [rw] type
|
219
|
+
# @return [::String]
|
220
|
+
# The resource type that the annotated field references.
|
221
|
+
#
|
222
|
+
# Example:
|
223
|
+
#
|
224
|
+
# message Subscription {
|
225
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
226
|
+
# type: "pubsub.googleapis.com/Topic"
|
227
|
+
# }];
|
228
|
+
# }
|
229
|
+
# @!attribute [rw] child_type
|
230
|
+
# @return [::String]
|
231
|
+
# The resource type of a child collection that the annotated field
|
232
|
+
# references. This is useful for annotating the `parent` field that
|
233
|
+
# doesn't have a fixed resource type.
|
234
|
+
#
|
235
|
+
# Example:
|
236
|
+
#
|
237
|
+
# message ListLogEntriesRequest {
|
238
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
# };
|
241
|
+
# }
|
242
|
+
class ResourceReference
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Logging
|
23
|
+
module Type
|
24
|
+
# A common proto for logging HTTP requests. Only contains semantics
|
25
|
+
# defined by the HTTP specification. Product-specific logging
|
26
|
+
# information MUST be defined in a separate message.
|
27
|
+
# @!attribute [rw] request_method
|
28
|
+
# @return [::String]
|
29
|
+
# The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
|
30
|
+
# @!attribute [rw] request_url
|
31
|
+
# @return [::String]
|
32
|
+
# The scheme (http, https), the host name, the path and the query
|
33
|
+
# portion of the URL that was requested.
|
34
|
+
# Example: `"http://example.com/some/info?color=red"`.
|
35
|
+
# @!attribute [rw] request_size
|
36
|
+
# @return [::Integer]
|
37
|
+
# The size of the HTTP request message in bytes, including the request
|
38
|
+
# headers and the request body.
|
39
|
+
# @!attribute [rw] status
|
40
|
+
# @return [::Integer]
|
41
|
+
# The response code indicating the status of response.
|
42
|
+
# Examples: 200, 404.
|
43
|
+
# @!attribute [rw] response_size
|
44
|
+
# @return [::Integer]
|
45
|
+
# The size of the HTTP response message sent back to the client, in bytes,
|
46
|
+
# including the response headers and the response body.
|
47
|
+
# @!attribute [rw] user_agent
|
48
|
+
# @return [::String]
|
49
|
+
# The user agent sent by the client. Example:
|
50
|
+
# `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
|
51
|
+
# CLR 1.0.3705)"`.
|
52
|
+
# @!attribute [rw] remote_ip
|
53
|
+
# @return [::String]
|
54
|
+
# The IP address (IPv4 or IPv6) of the client that issued the HTTP
|
55
|
+
# request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
|
56
|
+
# @!attribute [rw] server_ip
|
57
|
+
# @return [::String]
|
58
|
+
# The IP address (IPv4 or IPv6) of the origin server that the request was
|
59
|
+
# sent to.
|
60
|
+
# @!attribute [rw] referer
|
61
|
+
# @return [::String]
|
62
|
+
# The referer URL of the request, as defined in
|
63
|
+
# [HTTP/1.1 Header Field
|
64
|
+
# Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
|
65
|
+
# @!attribute [rw] latency
|
66
|
+
# @return [::Google::Protobuf::Duration]
|
67
|
+
# The request processing latency on the server, from the time the request was
|
68
|
+
# received until the response was sent.
|
69
|
+
# @!attribute [rw] cache_lookup
|
70
|
+
# @return [::Boolean]
|
71
|
+
# Whether or not a cache lookup was attempted.
|
72
|
+
# @!attribute [rw] cache_hit
|
73
|
+
# @return [::Boolean]
|
74
|
+
# Whether or not an entity was served from cache
|
75
|
+
# (with or without validation).
|
76
|
+
# @!attribute [rw] cache_validated_with_origin_server
|
77
|
+
# @return [::Boolean]
|
78
|
+
# Whether or not the response was validated with the origin server before
|
79
|
+
# being served from cache. This field is only meaningful if `cache_hit` is
|
80
|
+
# True.
|
81
|
+
# @!attribute [rw] cache_fill_bytes
|
82
|
+
# @return [::Integer]
|
83
|
+
# The number of HTTP response bytes inserted into cache. Set only when a
|
84
|
+
# cache fill was attempted.
|
85
|
+
# @!attribute [rw] protocol
|
86
|
+
# @return [::String]
|
87
|
+
# Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
|
88
|
+
class HttpRequest
|
89
|
+
include ::Google::Protobuf::MessageExts
|
90
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Logging
|
23
|
+
module Type
|
24
|
+
# The severity of the event described in a log entry, expressed as one of the
|
25
|
+
# standard severity levels listed below. For your reference, the levels are
|
26
|
+
# assigned the listed numeric values. The effect of using numeric values other
|
27
|
+
# than those listed is undefined.
|
28
|
+
#
|
29
|
+
# You can filter for log entries by severity. For example, the following
|
30
|
+
# filter expression will match log entries with severities `INFO`, `NOTICE`,
|
31
|
+
# and `WARNING`:
|
32
|
+
#
|
33
|
+
# severity > DEBUG AND severity <= WARNING
|
34
|
+
#
|
35
|
+
# If you are writing log entries, you should map other severity encodings to
|
36
|
+
# one of these standard levels. For example, you might map all of Java's FINE,
|
37
|
+
# FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the
|
38
|
+
# original severity level in the log entry payload if you wish.
|
39
|
+
module LogSeverity
|
40
|
+
# (0) The log entry has no assigned severity level.
|
41
|
+
DEFAULT = 0
|
42
|
+
|
43
|
+
# (100) Debug or trace information.
|
44
|
+
DEBUG = 100
|
45
|
+
|
46
|
+
# (200) Routine information, such as ongoing status or performance.
|
47
|
+
INFO = 200
|
48
|
+
|
49
|
+
# (300) Normal but significant events, such as start up, shut down, or
|
50
|
+
# a configuration change.
|
51
|
+
NOTICE = 300
|
52
|
+
|
53
|
+
# (400) Warning events might cause problems.
|
54
|
+
WARNING = 400
|
55
|
+
|
56
|
+
# (500) Error events are likely to cause problems.
|
57
|
+
ERROR = 500
|
58
|
+
|
59
|
+
# (600) Critical events cause more severe problems or outages.
|
60
|
+
CRITICAL = 600
|
61
|
+
|
62
|
+
# (700) A person must take an action immediately.
|
63
|
+
ALERT = 700
|
64
|
+
|
65
|
+
# (800) One or more systems are unusable.
|
66
|
+
EMERGENCY = 800
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Logging
|
23
|
+
module V2
|
24
|
+
# An individual entry in a log.
|
25
|
+
# @!attribute [rw] log_name
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The resource name of the log to which this log entry belongs:
|
28
|
+
#
|
29
|
+
# "projects/[PROJECT_ID]/logs/[LOG_ID]"
|
30
|
+
# "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
|
31
|
+
# "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
|
32
|
+
# "folders/[FOLDER_ID]/logs/[LOG_ID]"
|
33
|
+
#
|
34
|
+
# A project number may be used in place of PROJECT_ID. The project number is
|
35
|
+
# translated to its corresponding PROJECT_ID internally and the `log_name`
|
36
|
+
# field will contain PROJECT_ID in queries and exports.
|
37
|
+
#
|
38
|
+
# `[LOG_ID]` must be URL-encoded within `log_name`. Example:
|
39
|
+
# `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
|
40
|
+
# `[LOG_ID]` must be less than 512 characters long and can only include the
|
41
|
+
# following characters: upper and lower case alphanumeric characters,
|
42
|
+
# forward-slash, underscore, hyphen, and period.
|
43
|
+
#
|
44
|
+
# For backward compatibility, if `log_name` begins with a forward-slash, such
|
45
|
+
# as `/projects/...`, then the log entry is ingested as usual but the
|
46
|
+
# forward-slash is removed. Listing the log entry will not show the leading
|
47
|
+
# slash and filtering for a log name with a leading slash will never return
|
48
|
+
# any results.
|
49
|
+
# @!attribute [rw] resource
|
50
|
+
# @return [::Google::Api::MonitoredResource]
|
51
|
+
# Required. The monitored resource that produced this log entry.
|
52
|
+
#
|
53
|
+
# Example: a log entry that reports a database error would be associated with
|
54
|
+
# the monitored resource designating the particular database that reported
|
55
|
+
# the error.
|
56
|
+
# @!attribute [rw] proto_payload
|
57
|
+
# @return [::Google::Protobuf::Any]
|
58
|
+
# The log entry payload, represented as a protocol buffer. Some Google
|
59
|
+
# Cloud Platform services use this field for their log entry payloads.
|
60
|
+
#
|
61
|
+
# The following protocol buffer types are supported; user-defined types
|
62
|
+
# are not supported:
|
63
|
+
#
|
64
|
+
# "type.googleapis.com/google.cloud.audit.AuditLog"
|
65
|
+
# "type.googleapis.com/google.appengine.logging.v1.RequestLog"
|
66
|
+
# @!attribute [rw] text_payload
|
67
|
+
# @return [::String]
|
68
|
+
# The log entry payload, represented as a Unicode string (UTF-8).
|
69
|
+
# @!attribute [rw] json_payload
|
70
|
+
# @return [::Google::Protobuf::Struct]
|
71
|
+
# The log entry payload, represented as a structure that is
|
72
|
+
# expressed as a JSON object.
|
73
|
+
# @!attribute [rw] timestamp
|
74
|
+
# @return [::Google::Protobuf::Timestamp]
|
75
|
+
# Optional. The time the event described by the log entry occurred. This time is used
|
76
|
+
# to compute the log entry's age and to enforce the logs retention period.
|
77
|
+
# If this field is omitted in a new log entry, then Logging assigns it the
|
78
|
+
# current time. Timestamps have nanosecond accuracy, but trailing zeros in
|
79
|
+
# the fractional seconds might be omitted when the timestamp is displayed.
|
80
|
+
#
|
81
|
+
# Incoming log entries should have timestamps that are no more than the [logs
|
82
|
+
# retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours
|
83
|
+
# in the future. Log entries outside those time boundaries will not be
|
84
|
+
# available when calling `entries.list`, but those log entries can still be
|
85
|
+
# [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
|
86
|
+
# @!attribute [r] receive_timestamp
|
87
|
+
# @return [::Google::Protobuf::Timestamp]
|
88
|
+
# Output only. The time the log entry was received by Logging.
|
89
|
+
# @!attribute [rw] severity
|
90
|
+
# @return [::Google::Cloud::Logging::Type::LogSeverity]
|
91
|
+
# Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
|
92
|
+
# @!attribute [rw] insert_id
|
93
|
+
# @return [::String]
|
94
|
+
# Optional. A unique identifier for the log entry. If you provide a value, then
|
95
|
+
# Logging considers other log entries in the same project, with the same
|
96
|
+
# `timestamp`, and with the same `insert_id` to be duplicates which are
|
97
|
+
# removed in a single query result. However, there are no guarantees of
|
98
|
+
# de-duplication in the export of logs.
|
99
|
+
#
|
100
|
+
# If the `insert_id` is omitted when writing a log entry, the Logging API
|
101
|
+
# assigns its own unique identifier in this field.
|
102
|
+
#
|
103
|
+
# In queries, the `insert_id` is also used to order log entries that have
|
104
|
+
# the same `log_name` and `timestamp` values.
|
105
|
+
# @!attribute [rw] http_request
|
106
|
+
# @return [::Google::Cloud::Logging::Type::HttpRequest]
|
107
|
+
# Optional. Information about the HTTP request associated with this log entry, if
|
108
|
+
# applicable.
|
109
|
+
# @!attribute [rw] labels
|
110
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
111
|
+
# Optional. A set of user-defined (key, value) data that provides additional
|
112
|
+
# information about the log entry.
|
113
|
+
# @!attribute [rw] operation
|
114
|
+
# @return [::Google::Cloud::Logging::V2::LogEntryOperation]
|
115
|
+
# Optional. Information about an operation associated with the log entry, if
|
116
|
+
# applicable.
|
117
|
+
# @!attribute [rw] trace
|
118
|
+
# @return [::String]
|
119
|
+
# Optional. Resource name of the trace associated with the log entry, if any. If it
|
120
|
+
# contains a relative resource name, the name is assumed to be relative to
|
121
|
+
# `//tracing.googleapis.com`. Example:
|
122
|
+
# `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
|
123
|
+
# @!attribute [rw] span_id
|
124
|
+
# @return [::String]
|
125
|
+
# Optional. The span ID within the trace associated with the log entry.
|
126
|
+
#
|
127
|
+
# For Trace spans, this is the same format that the Trace API v2 uses: a
|
128
|
+
# 16-character hexadecimal encoding of an 8-byte array, such as
|
129
|
+
# `000000000000004a`.
|
130
|
+
# @!attribute [rw] trace_sampled
|
131
|
+
# @return [::Boolean]
|
132
|
+
# Optional. The sampling decision of the trace associated with the log entry.
|
133
|
+
#
|
134
|
+
# True means that the trace resource name in the `trace` field was sampled
|
135
|
+
# for storage in a trace backend. False means that the trace was not sampled
|
136
|
+
# for storage when this log entry was written, or the sampling decision was
|
137
|
+
# unknown at the time. A non-sampled `trace` value is still useful as a
|
138
|
+
# request correlation identifier. The default is False.
|
139
|
+
# @!attribute [rw] source_location
|
140
|
+
# @return [::Google::Cloud::Logging::V2::LogEntrySourceLocation]
|
141
|
+
# Optional. Source code location information associated with the log entry, if any.
|
142
|
+
class LogEntry
|
143
|
+
include ::Google::Protobuf::MessageExts
|
144
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
145
|
+
|
146
|
+
# @!attribute [rw] key
|
147
|
+
# @return [::String]
|
148
|
+
# @!attribute [rw] value
|
149
|
+
# @return [::String]
|
150
|
+
class LabelsEntry
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Additional information about a potentially long-running operation with which
|
157
|
+
# a log entry is associated.
|
158
|
+
# @!attribute [rw] id
|
159
|
+
# @return [::String]
|
160
|
+
# Optional. An arbitrary operation identifier. Log entries with the same
|
161
|
+
# identifier are assumed to be part of the same operation.
|
162
|
+
# @!attribute [rw] producer
|
163
|
+
# @return [::String]
|
164
|
+
# Optional. An arbitrary producer identifier. The combination of `id` and
|
165
|
+
# `producer` must be globally unique. Examples for `producer`:
|
166
|
+
# `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
|
167
|
+
# @!attribute [rw] first
|
168
|
+
# @return [::Boolean]
|
169
|
+
# Optional. Set this to True if this is the first log entry in the operation.
|
170
|
+
# @!attribute [rw] last
|
171
|
+
# @return [::Boolean]
|
172
|
+
# Optional. Set this to True if this is the last log entry in the operation.
|
173
|
+
class LogEntryOperation
|
174
|
+
include ::Google::Protobuf::MessageExts
|
175
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
176
|
+
end
|
177
|
+
|
178
|
+
# Additional information about the source code location that produced the log
|
179
|
+
# entry.
|
180
|
+
# @!attribute [rw] file
|
181
|
+
# @return [::String]
|
182
|
+
# Optional. Source file name. Depending on the runtime environment, this
|
183
|
+
# might be a simple name or a fully-qualified name.
|
184
|
+
# @!attribute [rw] line
|
185
|
+
# @return [::Integer]
|
186
|
+
# Optional. Line within the source file. 1-based; 0 indicates no line number
|
187
|
+
# available.
|
188
|
+
# @!attribute [rw] function
|
189
|
+
# @return [::String]
|
190
|
+
# Optional. Human-readable name of the function or method being invoked, with
|
191
|
+
# optional context such as the class or package name. This information may be
|
192
|
+
# used in contexts such as the logs viewer, where a file and line number are
|
193
|
+
# less meaningful. The format can vary by language. For example:
|
194
|
+
# `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
|
195
|
+
# (Python).
|
196
|
+
class LogEntrySourceLocation
|
197
|
+
include ::Google::Protobuf::MessageExts
|
198
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|