google-cloud-logging 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/INSTRUMENTATION.md +1 -1
- data/LOGGING.md +1 -1
- data/lib/google-cloud-logging.rb +1 -1
- data/lib/google/cloud/logging.rb +1 -1
- data/lib/google/cloud/logging/logger.rb +27 -18
- data/lib/google/cloud/logging/middleware.rb +1 -1
- data/lib/google/cloud/logging/rails.rb +1 -1
- data/lib/google/cloud/logging/v2/config_service_v2_client.rb +35 -35
- data/lib/google/cloud/logging/v2/doc/google/api/distribution.rb +18 -18
- data/lib/google/cloud/logging/v2/doc/google/api/metric.rb +69 -48
- data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +20 -21
- data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +5 -5
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +17 -17
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +50 -50
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +55 -55
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +28 -28
- data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +8 -8
- data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +3 -3
- data/lib/google/cloud/logging/v2/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/logging/v2/doc/google/protobuf/field_mask.rb +7 -7
- data/lib/google/cloud/logging/v2/doc/google/protobuf/struct.rb +11 -11
- data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +7 -7
- data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +27 -27
- data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +4 -4
- data/lib/google/cloud/logging/version.rb +1 -1
- metadata +3 -3
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
# @!attribute [rw] name
|
25
25
|
# @return [String]
|
26
26
|
# Required. The client-assigned sink identifier, unique within the
|
27
|
-
# project. Example:
|
27
|
+
# project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
|
28
28
|
# limited to 100 characters and can include only the following characters:
|
29
29
|
# upper and lower-case alphanumeric characters, underscores, hyphens, and
|
30
30
|
# periods.
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
|
37
37
|
# "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
|
38
38
|
#
|
39
|
-
# The sink's
|
39
|
+
# The sink's `writer_identity`, set when the sink is created, must
|
40
40
|
# have permission to write to the destination or else the log
|
41
41
|
# entries are not exported. For more information, see
|
42
42
|
# [Exporting Logs With Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
|
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
# [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create)
|
61
61
|
# and
|
62
62
|
# [sinks.update](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/update),
|
63
|
-
# based on the setting of
|
63
|
+
# based on the setting of `unique_writer_identity` in those methods.
|
64
64
|
#
|
65
65
|
# Until you grant this identity write-access to the destination, log entry
|
66
66
|
# exports from this sink will fail. For more information,
|
@@ -77,7 +77,7 @@ module Google
|
|
77
77
|
# sink's parent resource are also available for export. Whether a particular
|
78
78
|
# log entry from the children is exported depends on the sink's filter
|
79
79
|
# expression. For example, if this field is true, then the filter
|
80
|
-
#
|
80
|
+
# `resource.type=gce_instance` would export all Compute Engine VM instance
|
81
81
|
# log entries from all projects in the sink's parent. To only export entries
|
82
82
|
# from certain child projects, filter on the project part of the log name:
|
83
83
|
#
|
@@ -97,15 +97,15 @@ module Google
|
|
97
97
|
# An unspecified format version that will default to V2.
|
98
98
|
VERSION_FORMAT_UNSPECIFIED = 0
|
99
99
|
|
100
|
-
#
|
100
|
+
# `LogEntry` version 2 format.
|
101
101
|
V2 = 1
|
102
102
|
|
103
|
-
#
|
103
|
+
# `LogEntry` version 1 format.
|
104
104
|
V1 = 2
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
# The parameters to
|
108
|
+
# The parameters to `ListSinks`.
|
109
109
|
# @!attribute [rw] parent
|
110
110
|
# @return [String]
|
111
111
|
# Required. The parent resource whose sinks are to be listed:
|
@@ -117,28 +117,28 @@ module Google
|
|
117
117
|
# @!attribute [rw] page_token
|
118
118
|
# @return [String]
|
119
119
|
# Optional. If present, then retrieve the next batch of results from the
|
120
|
-
# preceding call to this method.
|
121
|
-
#
|
120
|
+
# preceding call to this method. `pageToken` must be the value of
|
121
|
+
# `nextPageToken` from the previous response. The values of other method
|
122
122
|
# parameters should be identical to those in the previous call.
|
123
123
|
# @!attribute [rw] page_size
|
124
124
|
# @return [Integer]
|
125
125
|
# Optional. The maximum number of results to return from this request.
|
126
|
-
# Non-positive values are ignored. The presence of
|
126
|
+
# Non-positive values are ignored. The presence of `nextPageToken` in the
|
127
127
|
# response indicates that more results might be available.
|
128
128
|
class ListSinksRequest; end
|
129
129
|
|
130
|
-
# Result returned from
|
130
|
+
# Result returned from `ListSinks`.
|
131
131
|
# @!attribute [rw] sinks
|
132
132
|
# @return [Array<Google::Logging::V2::LogSink>]
|
133
133
|
# A list of sinks.
|
134
134
|
# @!attribute [rw] next_page_token
|
135
135
|
# @return [String]
|
136
136
|
# If there might be more results than appear in this response, then
|
137
|
-
#
|
138
|
-
# method again using the value of
|
137
|
+
# `nextPageToken` is included. To get the next set of results, call the same
|
138
|
+
# method again using the value of `nextPageToken` as `pageToken`.
|
139
139
|
class ListSinksResponse; end
|
140
140
|
|
141
|
-
# The parameters to
|
141
|
+
# The parameters to `GetSink`.
|
142
142
|
# @!attribute [rw] sink_name
|
143
143
|
# @return [String]
|
144
144
|
# Required. The resource name of the sink:
|
@@ -148,10 +148,10 @@ module Google
|
|
148
148
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
|
149
149
|
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
|
150
150
|
#
|
151
|
-
# Example:
|
151
|
+
# Example: `"projects/my-project-id/sinks/my-sink-id"`.
|
152
152
|
class GetSinkRequest; end
|
153
153
|
|
154
|
-
# The parameters to
|
154
|
+
# The parameters to `CreateSink`.
|
155
155
|
# @!attribute [rw] parent
|
156
156
|
# @return [String]
|
157
157
|
# Required. The resource in which to create the sink:
|
@@ -161,27 +161,27 @@ module Google
|
|
161
161
|
# "billingAccounts/[BILLING_ACCOUNT_ID]"
|
162
162
|
# "folders/[FOLDER_ID]"
|
163
163
|
#
|
164
|
-
# Examples:
|
164
|
+
# Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
|
165
165
|
# @!attribute [rw] sink
|
166
166
|
# @return [Google::Logging::V2::LogSink]
|
167
|
-
# Required. The new sink, whose
|
167
|
+
# Required. The new sink, whose `name` parameter is a sink identifier that
|
168
168
|
# is not already in use.
|
169
169
|
# @!attribute [rw] unique_writer_identity
|
170
170
|
# @return [true, false]
|
171
|
-
# Optional. Determines the kind of IAM identity returned as
|
171
|
+
# Optional. Determines the kind of IAM identity returned as `writer_identity`
|
172
172
|
# in the new sink. If this value is omitted or set to false, and if the
|
173
|
-
# sink's parent is a project, then the value returned as
|
173
|
+
# sink's parent is a project, then the value returned as `writer_identity` is
|
174
174
|
# the same group or service account used by Stackdriver Logging before the
|
175
175
|
# addition of writer identities to this API. The sink's destination must be
|
176
176
|
# in the same project as the sink itself.
|
177
177
|
#
|
178
178
|
# If this field is set to true, or if the sink is owned by a non-project
|
179
|
-
# resource such as an organization, then the value of
|
179
|
+
# resource such as an organization, then the value of `writer_identity` will
|
180
180
|
# be a unique service account used only for exports from the new sink. For
|
181
|
-
# more information, see
|
181
|
+
# more information, see `writer_identity` in {Google::Logging::V2::LogSink LogSink}.
|
182
182
|
class CreateSinkRequest; end
|
183
183
|
|
184
|
-
# The parameters to
|
184
|
+
# The parameters to `UpdateSink`.
|
185
185
|
# @!attribute [rw] sink_name
|
186
186
|
# @return [String]
|
187
187
|
# Required. The full resource name of the sink to update, including the
|
@@ -192,30 +192,30 @@ module Google
|
|
192
192
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
|
193
193
|
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
|
194
194
|
#
|
195
|
-
# Example:
|
195
|
+
# Example: `"projects/my-project-id/sinks/my-sink-id"`.
|
196
196
|
# @!attribute [rw] sink
|
197
197
|
# @return [Google::Logging::V2::LogSink]
|
198
198
|
# Required. The updated sink, whose name is the same identifier that appears
|
199
|
-
# as part of
|
199
|
+
# as part of `sink_name`.
|
200
200
|
# @!attribute [rw] unique_writer_identity
|
201
201
|
# @return [true, false]
|
202
202
|
# Optional. See
|
203
203
|
# [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create)
|
204
204
|
# for a description of this field. When updating a sink, the effect of this
|
205
|
-
# field on the value of
|
205
|
+
# field on the value of `writer_identity` in the updated sink depends on both
|
206
206
|
# the old and new values of this field:
|
207
207
|
#
|
208
208
|
# * If the old and new values of this field are both false or both true,
|
209
|
-
# then there is no change to the sink's
|
209
|
+
# then there is no change to the sink's `writer_identity`.
|
210
210
|
# * If the old value is false and the new value is true, then
|
211
|
-
#
|
211
|
+
# `writer_identity` is changed to a unique service account.
|
212
212
|
# * It is an error if the old value is true and the new value is
|
213
213
|
# set to false or defaulted to false.
|
214
214
|
# @!attribute [rw] update_mask
|
215
215
|
# @return [Google::Protobuf::FieldMask]
|
216
|
-
# Optional. Field mask that specifies the fields in
|
216
|
+
# Optional. Field mask that specifies the fields in `sink` that need
|
217
217
|
# an update. A sink field will be overwritten if, and only if, it is
|
218
|
-
# in the update mask.
|
218
|
+
# in the update mask. `name` and output only fields cannot be updated.
|
219
219
|
#
|
220
220
|
# An empty updateMask is temporarily treated as using the following mask
|
221
221
|
# for backwards compatibility purposes:
|
@@ -223,13 +223,13 @@ module Google
|
|
223
223
|
# At some point in the future, behavior will be removed and specifying an
|
224
224
|
# empty updateMask will be an error.
|
225
225
|
#
|
226
|
-
# For a detailed
|
226
|
+
# For a detailed `FieldMask` definition, see
|
227
227
|
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
228
228
|
#
|
229
|
-
# Example:
|
229
|
+
# Example: `updateMask=filter`.
|
230
230
|
class UpdateSinkRequest; end
|
231
231
|
|
232
|
-
# The parameters to
|
232
|
+
# The parameters to `DeleteSink`.
|
233
233
|
# @!attribute [rw] sink_name
|
234
234
|
# @return [String]
|
235
235
|
# Required. The full resource name of the sink to delete, including the
|
@@ -240,7 +240,7 @@ module Google
|
|
240
240
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
|
241
241
|
# "folders/[FOLDER_ID]/sinks/[SINK_ID]"
|
242
242
|
#
|
243
|
-
# Example:
|
243
|
+
# Example: `"projects/my-project-id/sinks/my-sink-id"`.
|
244
244
|
class DeleteSinkRequest; end
|
245
245
|
|
246
246
|
# Specifies a set of log entries that are not to be stored in Stackdriver
|
@@ -252,7 +252,7 @@ module Google
|
|
252
252
|
# @!attribute [rw] name
|
253
253
|
# @return [String]
|
254
254
|
# Required. A client-assigned identifier, such as
|
255
|
-
#
|
255
|
+
# `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
|
256
256
|
# can include only letters, digits, underscores, hyphens, and periods.
|
257
257
|
# @!attribute [rw] description
|
258
258
|
# @return [String]
|
@@ -267,7 +267,7 @@ module Google
|
|
267
267
|
# For example, the following filter matches 99% of low-severity log
|
268
268
|
# entries from load balancers:
|
269
269
|
#
|
270
|
-
#
|
270
|
+
# `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"`
|
271
271
|
# @!attribute [rw] disabled
|
272
272
|
# @return [true, false]
|
273
273
|
# Optional. If set to True, then this exclusion is disabled and it does not
|
@@ -276,7 +276,7 @@ module Google
|
|
276
276
|
# to change the value of this field.
|
277
277
|
class LogExclusion; end
|
278
278
|
|
279
|
-
# The parameters to
|
279
|
+
# The parameters to `ListExclusions`.
|
280
280
|
# @!attribute [rw] parent
|
281
281
|
# @return [String]
|
282
282
|
# Required. The parent resource whose exclusions are to be listed.
|
@@ -288,28 +288,28 @@ module Google
|
|
288
288
|
# @!attribute [rw] page_token
|
289
289
|
# @return [String]
|
290
290
|
# Optional. If present, then retrieve the next batch of results from the
|
291
|
-
# preceding call to this method.
|
292
|
-
#
|
291
|
+
# preceding call to this method. `pageToken` must be the value of
|
292
|
+
# `nextPageToken` from the previous response. The values of other method
|
293
293
|
# parameters should be identical to those in the previous call.
|
294
294
|
# @!attribute [rw] page_size
|
295
295
|
# @return [Integer]
|
296
296
|
# Optional. The maximum number of results to return from this request.
|
297
|
-
# Non-positive values are ignored. The presence of
|
297
|
+
# Non-positive values are ignored. The presence of `nextPageToken` in the
|
298
298
|
# response indicates that more results might be available.
|
299
299
|
class ListExclusionsRequest; end
|
300
300
|
|
301
|
-
# Result returned from
|
301
|
+
# Result returned from `ListExclusions`.
|
302
302
|
# @!attribute [rw] exclusions
|
303
303
|
# @return [Array<Google::Logging::V2::LogExclusion>]
|
304
304
|
# A list of exclusions.
|
305
305
|
# @!attribute [rw] next_page_token
|
306
306
|
# @return [String]
|
307
307
|
# If there might be more results than appear in this response, then
|
308
|
-
#
|
309
|
-
# method again using the value of
|
308
|
+
# `nextPageToken` is included. To get the next set of results, call the same
|
309
|
+
# method again using the value of `nextPageToken` as `pageToken`.
|
310
310
|
class ListExclusionsResponse; end
|
311
311
|
|
312
|
-
# The parameters to
|
312
|
+
# The parameters to `GetExclusion`.
|
313
313
|
# @!attribute [rw] name
|
314
314
|
# @return [String]
|
315
315
|
# Required. The resource name of an existing exclusion:
|
@@ -319,10 +319,10 @@ module Google
|
|
319
319
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
|
320
320
|
# "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
|
321
321
|
#
|
322
|
-
# Example:
|
322
|
+
# Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
|
323
323
|
class GetExclusionRequest; end
|
324
324
|
|
325
|
-
# The parameters to
|
325
|
+
# The parameters to `CreateExclusion`.
|
326
326
|
# @!attribute [rw] parent
|
327
327
|
# @return [String]
|
328
328
|
# Required. The parent resource in which to create the exclusion:
|
@@ -332,14 +332,14 @@ module Google
|
|
332
332
|
# "billingAccounts/[BILLING_ACCOUNT_ID]"
|
333
333
|
# "folders/[FOLDER_ID]"
|
334
334
|
#
|
335
|
-
# Examples:
|
335
|
+
# Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
|
336
336
|
# @!attribute [rw] exclusion
|
337
337
|
# @return [Google::Logging::V2::LogExclusion]
|
338
|
-
# Required. The new exclusion, whose
|
338
|
+
# Required. The new exclusion, whose `name` parameter is an exclusion name
|
339
339
|
# that is not already used in the parent resource.
|
340
340
|
class CreateExclusionRequest; end
|
341
341
|
|
342
|
-
# The parameters to
|
342
|
+
# The parameters to `UpdateExclusion`.
|
343
343
|
# @!attribute [rw] name
|
344
344
|
# @return [String]
|
345
345
|
# Required. The resource name of the exclusion to update:
|
@@ -349,23 +349,23 @@ module Google
|
|
349
349
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
|
350
350
|
# "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
|
351
351
|
#
|
352
|
-
# Example:
|
352
|
+
# Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
|
353
353
|
# @!attribute [rw] exclusion
|
354
354
|
# @return [Google::Logging::V2::LogExclusion]
|
355
355
|
# Required. New values for the existing exclusion. Only the fields specified
|
356
|
-
# in
|
356
|
+
# in `update_mask` are relevant.
|
357
357
|
# @!attribute [rw] update_mask
|
358
358
|
# @return [Google::Protobuf::FieldMask]
|
359
359
|
# Required. A nonempty list of fields to change in the existing exclusion.
|
360
360
|
# New values for the fields are taken from the corresponding fields in the
|
361
361
|
# {Google::Logging::V2::LogExclusion LogExclusion} included in this request. Fields not mentioned in
|
362
|
-
#
|
362
|
+
# `update_mask` are not changed and are ignored in the request.
|
363
363
|
#
|
364
364
|
# For example, to change the filter and description of an exclusion,
|
365
|
-
# specify an
|
365
|
+
# specify an `update_mask` of `"filter,description"`.
|
366
366
|
class UpdateExclusionRequest; end
|
367
367
|
|
368
|
-
# The parameters to
|
368
|
+
# The parameters to `DeleteExclusion`.
|
369
369
|
# @!attribute [rw] name
|
370
370
|
# @return [String]
|
371
371
|
# Required. The resource name of an existing exclusion to delete:
|
@@ -375,7 +375,7 @@ module Google
|
|
375
375
|
# "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
|
376
376
|
# "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
|
377
377
|
#
|
378
|
-
# Example:
|
378
|
+
# Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
|
379
379
|
class DeleteExclusionRequest; end
|
380
380
|
end
|
381
381
|
end
|
@@ -26,20 +26,20 @@ module Google
|
|
26
26
|
# @!attribute [rw] name
|
27
27
|
# @return [String]
|
28
28
|
# Required. The client-assigned metric identifier.
|
29
|
-
# Examples:
|
29
|
+
# Examples: `"error_count"`, `"nginx/requests"`.
|
30
30
|
#
|
31
31
|
# Metric identifiers are limited to 100 characters and can include
|
32
|
-
# only the following characters:
|
33
|
-
# special characters
|
34
|
-
# (
|
32
|
+
# only the following characters: `A-Z`, `a-z`, `0-9`, and the
|
33
|
+
# special characters `_-.,+!*',()%/`. The forward-slash character
|
34
|
+
# (`/`) denotes a hierarchy of name pieces, and it cannot be the
|
35
35
|
# first character of the name.
|
36
36
|
#
|
37
37
|
# The metric identifier in this field must not be
|
38
38
|
# [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding).
|
39
|
-
# However, when the metric identifier appears as the
|
40
|
-
# part of a
|
39
|
+
# However, when the metric identifier appears as the `[METRIC_ID]`
|
40
|
+
# part of a `metric_name` API parameter, then the metric identifier
|
41
41
|
# must be URL-encoded. Example:
|
42
|
-
#
|
42
|
+
# `"projects/my-project/metrics/nginx%2Frequests"`.
|
43
43
|
# @!attribute [rw] description
|
44
44
|
# @return [String]
|
45
45
|
# Optional. A description of this metric, which is used in documentation.
|
@@ -57,30 +57,30 @@ module Google
|
|
57
57
|
# Optional. The metric descriptor associated with the logs-based metric.
|
58
58
|
# If unspecified, it uses a default metric descriptor with a DELTA metric
|
59
59
|
# kind, INT64 value type, with no labels and a unit of "1". Such a metric
|
60
|
-
# counts the number of log entries matching the
|
60
|
+
# counts the number of log entries matching the `filter` expression.
|
61
61
|
#
|
62
|
-
# The
|
63
|
-
# are output only, and is constructed using the
|
62
|
+
# The `name`, `type`, and `description` fields in the `metric_descriptor`
|
63
|
+
# are output only, and is constructed using the `name` and `description`
|
64
64
|
# field in the LogMetric.
|
65
65
|
#
|
66
66
|
# To create a logs-based metric that records a distribution of log values, a
|
67
67
|
# DELTA metric kind with a DISTRIBUTION value type must be used along with
|
68
|
-
# a
|
68
|
+
# a `value_extractor` expression in the LogMetric.
|
69
69
|
#
|
70
70
|
# Each label in the metric descriptor must have a matching label
|
71
71
|
# name as the key and an extractor expression as the value in the
|
72
|
-
#
|
72
|
+
# `label_extractors` map.
|
73
73
|
#
|
74
|
-
# The
|
74
|
+
# The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot
|
75
75
|
# be updated once initially configured. New labels can be added in the
|
76
|
-
#
|
76
|
+
# `metric_descriptor`, but existing labels cannot be modified except for
|
77
77
|
# their description.
|
78
78
|
# @!attribute [rw] value_extractor
|
79
79
|
# @return [String]
|
80
|
-
# Optional. A
|
80
|
+
# Optional. A `value_extractor` is required when using a distribution
|
81
81
|
# logs-based metric to extract the values to record from a log entry.
|
82
|
-
# Two functions are supported for value extraction:
|
83
|
-
#
|
82
|
+
# Two functions are supported for value extraction: `EXTRACT(field)` or
|
83
|
+
# `REGEXP_EXTRACT(field, regex)`. The argument are:
|
84
84
|
# 1. field: The name of the log entry field from which the value is to be
|
85
85
|
# extracted.
|
86
86
|
# 2. regex: A regular expression using the Google RE2 syntax
|
@@ -95,26 +95,26 @@ module Google
|
|
95
95
|
# the conversion to double fails, then those values are not recorded in the
|
96
96
|
# distribution.
|
97
97
|
#
|
98
|
-
# Example:
|
98
|
+
# Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")`
|
99
99
|
# @!attribute [rw] label_extractors
|
100
100
|
# @return [Hash{String => String}]
|
101
101
|
# Optional. A map from a label key string to an extractor expression which is
|
102
102
|
# used to extract data from a log entry field and assign as the label value.
|
103
103
|
# Each label key specified in the LabelDescriptor must have an associated
|
104
104
|
# extractor expression in this map. The syntax of the extractor expression
|
105
|
-
# is the same as for the
|
105
|
+
# is the same as for the `value_extractor` field.
|
106
106
|
#
|
107
107
|
# The extracted value is converted to the type defined in the label
|
108
108
|
# descriptor. If the either the extraction or the type conversion fails,
|
109
109
|
# the label will have a default value. The default value for a string
|
110
110
|
# label is an empty string, for an integer label its 0, and for a boolean
|
111
|
-
# label its
|
111
|
+
# label its `false`.
|
112
112
|
#
|
113
113
|
# Note that there are upper bounds on the maximum number of labels and the
|
114
114
|
# number of active time series that are allowed in a project.
|
115
115
|
# @!attribute [rw] bucket_options
|
116
116
|
# @return [Google::Api::Distribution::BucketOptions]
|
117
|
-
# Optional. The
|
117
|
+
# Optional. The `bucket_options` are required when the logs-based metric is
|
118
118
|
# using a DISTRIBUTION value type and it describes the bucket boundaries
|
119
119
|
# used to create a histogram of the extracted values.
|
120
120
|
# @!attribute [rw] version
|
@@ -141,13 +141,13 @@ module Google
|
|
141
141
|
# @!attribute [rw] page_token
|
142
142
|
# @return [String]
|
143
143
|
# Optional. If present, then retrieve the next batch of results from the
|
144
|
-
# preceding call to this method.
|
145
|
-
#
|
144
|
+
# preceding call to this method. `pageToken` must be the value of
|
145
|
+
# `nextPageToken` from the previous response. The values of other method
|
146
146
|
# parameters should be identical to those in the previous call.
|
147
147
|
# @!attribute [rw] page_size
|
148
148
|
# @return [Integer]
|
149
149
|
# Optional. The maximum number of results to return from this request.
|
150
|
-
# Non-positive values are ignored. The presence of
|
150
|
+
# Non-positive values are ignored. The presence of `nextPageToken` in the
|
151
151
|
# response indicates that more results might be available.
|
152
152
|
class ListLogMetricsRequest; end
|
153
153
|
|
@@ -158,8 +158,8 @@ module Google
|
|
158
158
|
# @!attribute [rw] next_page_token
|
159
159
|
# @return [String]
|
160
160
|
# If there might be more results than appear in this response, then
|
161
|
-
#
|
162
|
-
# method again using the value of
|
161
|
+
# `nextPageToken` is included. To get the next set of results, call this
|
162
|
+
# method again using the value of `nextPageToken` as `pageToken`.
|
163
163
|
class ListLogMetricsResponse; end
|
164
164
|
|
165
165
|
# The parameters to GetLogMetric.
|
@@ -192,8 +192,8 @@ module Google
|
|
192
192
|
# "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
|
193
193
|
#
|
194
194
|
# The updated metric must be provided in the request and it's
|
195
|
-
#
|
196
|
-
# does not exist in
|
195
|
+
# `name` field must be the same as `[METRIC_ID]` If the metric
|
196
|
+
# does not exist in `[PROJECT_ID]`, then a new metric is created.
|
197
197
|
# @!attribute [rw] metric
|
198
198
|
# @return [Google::Logging::V2::LogMetric]
|
199
199
|
# The updated metric.
|