google-cloud-logging-v2 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/logging/v2/config_service/client.rb +728 -71
  5. data/lib/google/cloud/logging/v2/config_service/operations.rb +14 -16
  6. data/lib/google/cloud/logging/v2/config_service/paths.rb +81 -0
  7. data/lib/google/cloud/logging/v2/config_service.rb +1 -1
  8. data/lib/google/cloud/logging/v2/logging_service/client.rb +47 -48
  9. data/lib/google/cloud/logging/v2/logging_service.rb +1 -1
  10. data/lib/google/cloud/logging/v2/metrics_service/client.rb +6 -8
  11. data/lib/google/cloud/logging/v2/metrics_service.rb +1 -1
  12. data/lib/google/cloud/logging/v2/version.rb +1 -1
  13. data/lib/google/cloud/logging/v2.rb +2 -2
  14. data/lib/google/logging/v2/logging_config_pb.rb +84 -5
  15. data/lib/google/logging/v2/logging_config_services_pb.rb +23 -5
  16. data/lib/google/logging/v2/logging_metrics_pb.rb +1 -0
  17. data/lib/google/logging/v2/logging_pb.rb +1 -1
  18. data/proto_docs/google/api/client.rb +381 -0
  19. data/proto_docs/google/api/distribution.rb +2 -0
  20. data/proto_docs/google/api/launch_stage.rb +3 -3
  21. data/proto_docs/google/api/metric.rb +10 -6
  22. data/proto_docs/google/api/monitored_resource.rb +30 -18
  23. data/proto_docs/google/logging/type/http_request.rb +1 -1
  24. data/proto_docs/google/logging/v2/log_entry.rb +56 -23
  25. data/proto_docs/google/logging/v2/logging.rb +36 -35
  26. data/proto_docs/google/logging/v2/logging_config.rb +350 -78
  27. data/proto_docs/google/logging/v2/logging_metrics.rb +14 -2
  28. data/proto_docs/google/rpc/status.rb +4 -2
  29. metadata +9 -8
@@ -73,11 +73,12 @@ module Google
73
73
  # expressed as a JSON object.
74
74
  # @!attribute [rw] timestamp
75
75
  # @return [::Google::Protobuf::Timestamp]
76
- # Optional. The time the event described by the log entry occurred. This time is used
77
- # to compute the log entry's age and to enforce the logs retention period.
78
- # If this field is omitted in a new log entry, then Logging assigns it the
79
- # current time. Timestamps have nanosecond accuracy, but trailing zeros in
80
- # the fractional seconds might be omitted when the timestamp is displayed.
76
+ # Optional. The time the event described by the log entry occurred. This time
77
+ # is used to compute the log entry's age and to enforce the logs retention
78
+ # period. If this field is omitted in a new log entry, then Logging assigns
79
+ # it the current time. Timestamps have nanosecond accuracy, but trailing
80
+ # zeros in the fractional seconds might be omitted when the timestamp is
81
+ # displayed.
81
82
  #
82
83
  # Incoming log entries must have timestamps that don't exceed the
83
84
  # [logs retention
@@ -89,11 +90,12 @@ module Google
89
90
  # Output only. The time the log entry was received by Logging.
90
91
  # @!attribute [rw] severity
91
92
  # @return [::Google::Cloud::Logging::Type::LogSeverity]
92
- # Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
93
+ # Optional. The severity of the log entry. The default value is
94
+ # `LogSeverity.DEFAULT`.
93
95
  # @!attribute [rw] insert_id
94
96
  # @return [::String]
95
- # Optional. A unique identifier for the log entry. If you provide a value, then
96
- # Logging considers other log entries in the same project, with the same
97
+ # Optional. A unique identifier for the log entry. If you provide a value,
98
+ # then Logging considers other log entries in the same project, with the same
97
99
  # `timestamp`, and with the same `insert_id` to be duplicates which are
98
100
  # removed in a single query result. However, there are no guarantees of
99
101
  # de-duplication in the export of logs.
@@ -105,12 +107,12 @@ module Google
105
107
  # the same `log_name` and `timestamp` values.
106
108
  # @!attribute [rw] http_request
107
109
  # @return [::Google::Cloud::Logging::Type::HttpRequest]
108
- # Optional. Information about the HTTP request associated with this log entry, if
109
- # applicable.
110
+ # Optional. Information about the HTTP request associated with this log
111
+ # entry, if applicable.
110
112
  # @!attribute [rw] labels
111
113
  # @return [::Google::Protobuf::Map{::String => ::String}]
112
- # Optional. A map of key, value pairs that provides additional information about the
113
- # log entry. The labels can be user-defined or system-defined.
114
+ # Optional. A map of key, value pairs that provides additional information
115
+ # about the log entry. The labels can be user-defined or system-defined.
114
116
  #
115
117
  # User-defined labels are arbitrary key, value pairs that you can use to
116
118
  # classify logs.
@@ -129,17 +131,47 @@ module Google
129
131
  # applicable.
130
132
  # @!attribute [rw] trace
131
133
  # @return [::String]
132
- # Optional. Resource name of the trace associated with the log entry, if any. If it
133
- # contains a relative resource name, the name is assumed to be relative to
134
- # `//tracing.googleapis.com`. Example:
135
- # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
134
+ # Optional. The REST resource name of the trace being written to
135
+ # [Cloud Trace](https://cloud.google.com/trace) in
136
+ # association with this log entry. For example, if your trace data is stored
137
+ # in the Cloud project "my-trace-project" and if the service that is creating
138
+ # the log entry receives a trace header that includes the trace ID "12345",
139
+ # then the service should use "projects/my-tracing-project/traces/12345".
140
+ #
141
+ # The `trace` field provides the link between logs and traces. By using
142
+ # this field, you can navigate from a log entry to a trace.
136
143
  # @!attribute [rw] span_id
137
144
  # @return [::String]
138
- # Optional. The span ID within the trace associated with the log entry.
145
+ # Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span
146
+ # associated with the current operation in which the log is being written.
147
+ # For example, if a span has the REST resource name of
148
+ # "projects/some-project/traces/some-trace/spans/some-span-id", then the
149
+ # `span_id` field is "some-span-id".
150
+ #
151
+ # A
152
+ # [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span)
153
+ # represents a single operation within a trace. Whereas a trace may involve
154
+ # multiple different microservices running on multiple different machines,
155
+ # a span generally corresponds to a single logical operation being performed
156
+ # in a single instance of a microservice on one specific machine. Spans
157
+ # are the nodes within the tree that is a trace.
158
+ #
159
+ # Applications that are [instrumented for
160
+ # tracing](https://cloud.google.com/trace/docs/setup) will generally assign a
161
+ # new, unique span ID on each incoming request. It is also common to create
162
+ # and record additional spans corresponding to internal processing elements
163
+ # as well as issuing requests to dependencies.
164
+ #
165
+ # The span ID is expected to be a 16-character, hexadecimal encoding of an
166
+ # 8-byte array and should not be zero. It should be unique within the trace
167
+ # and should, ideally, be generated in a manner that is uniformly random.
168
+ #
169
+ # Example values:
139
170
  #
140
- # For Trace spans, this is the same format that the Trace API v2 uses: a
141
- # 16-character hexadecimal encoding of an 8-byte array, such as
142
- # `000000000000004a`.
171
+ # - `000000000000004a`
172
+ # - `7a2190356c3fc94b`
173
+ # - `0000f00300090021`
174
+ # - `d39223e101960076`
143
175
  # @!attribute [rw] trace_sampled
144
176
  # @return [::Boolean]
145
177
  # Optional. The sampling decision of the trace associated with the log entry.
@@ -151,11 +183,12 @@ module Google
151
183
  # request correlation identifier. The default is False.
152
184
  # @!attribute [rw] source_location
153
185
  # @return [::Google::Cloud::Logging::V2::LogEntrySourceLocation]
154
- # Optional. Source code location information associated with the log entry, if any.
186
+ # Optional. Source code location information associated with the log entry,
187
+ # if any.
155
188
  # @!attribute [rw] split
156
189
  # @return [::Google::Cloud::Logging::V2::LogSplit]
157
- # Optional. Information indicating this LogEntry is part of a sequence of multiple log
158
- # entries split from a single LogEntry.
190
+ # Optional. Information indicating this LogEntry is part of a sequence of
191
+ # multiple log entries split from a single LogEntry.
159
192
  class LogEntry
160
193
  include ::Google::Protobuf::MessageExts
161
194
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -106,11 +106,13 @@ module Google
106
106
  # list, rather than calling this method for each individual log entry.
107
107
  # @!attribute [rw] partial_success
108
108
  # @return [::Boolean]
109
- # Optional. Whether valid entries should be written even if some other
110
- # entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
111
- # entry is not written, then the response status is the error associated
112
- # with one of the failed entries and the response includes error details
113
- # keyed by the entries' zero-based index in the `entries.write` method.
109
+ # Optional. Whether a batch's valid entries should be written even if some
110
+ # other entry failed due to a permanent error such as INVALID_ARGUMENT or
111
+ # PERMISSION_DENIED. If any entry failed, then the response status is the
112
+ # response status of one of the failed entries. The response will include
113
+ # error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by
114
+ # the entries' zero-based index in the `entries`. Failed requests for which
115
+ # no entries are written will not include per-entry errors.
114
116
  # @!attribute [rw] dry_run
115
117
  # @return [::Boolean]
116
118
  # Optional. If true, the request should expect normal response, but the
@@ -178,15 +180,14 @@ module Google
178
180
  # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
179
181
  #
180
182
  # Projects listed in the `project_ids` field are added to this list.
183
+ # A maximum of 100 resources may be specified in a single request.
181
184
  # @!attribute [rw] filter
182
185
  # @return [::String]
183
- # Optional. A filter that chooses which log entries to return. See [Advanced
184
- # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries).
185
- # Only log entries that match the filter are returned. An empty filter
186
- # matches all log entries in the resources listed in `resource_names`.
186
+ # Optional. Only log entries that match the filter are returned. An empty
187
+ # filter matches all log entries in the resources listed in `resource_names`.
187
188
  # Referencing a parent resource that is not listed in `resource_names` will
188
- # cause the filter to return no results. The maximum length of the filter is
189
- # 20000 characters.
189
+ # cause the filter to return no results. The maximum length of a filter is
190
+ # 20,000 characters.
190
191
  # @!attribute [rw] order_by
191
192
  # @return [::String]
192
193
  # Optional. How the results should be sorted. Presently, the only permitted
@@ -197,10 +198,10 @@ module Google
197
198
  # timestamps are returned in order of their `insert_id` values.
198
199
  # @!attribute [rw] page_size
199
200
  # @return [::Integer]
200
- # Optional. The maximum number of results to return from this request. Default is 50.
201
- # If the value is negative or exceeds 1000, the request is rejected. The
202
- # presence of `next_page_token` in the response indicates that more results
203
- # might be available.
201
+ # Optional. The maximum number of results to return from this request.
202
+ # Default is 50. If the value is negative or exceeds 1000, the request is
203
+ # rejected. The presence of `next_page_token` in the response indicates that
204
+ # more results might be available.
204
205
  # @!attribute [rw] page_token
205
206
  # @return [::String]
206
207
  # Optional. If present, then retrieve the next batch of results from the
@@ -269,26 +270,15 @@ module Google
269
270
  # The parameters to ListLogs.
270
271
  # @!attribute [rw] parent
271
272
  # @return [::String]
272
- # Required. The resource name that owns the logs:
273
+ # Required. The resource name to list logs for:
273
274
  #
274
275
  # * `projects/[PROJECT_ID]`
275
276
  # * `organizations/[ORGANIZATION_ID]`
276
277
  # * `billingAccounts/[BILLING_ACCOUNT_ID]`
277
278
  # * `folders/[FOLDER_ID]`
278
- # @!attribute [rw] page_size
279
- # @return [::Integer]
280
- # Optional. The maximum number of results to return from this request.
281
- # Non-positive values are ignored. The presence of `nextPageToken` in the
282
- # response indicates that more results might be available.
283
- # @!attribute [rw] page_token
284
- # @return [::String]
285
- # Optional. If present, then retrieve the next batch of results from the
286
- # preceding call to this method. `pageToken` must be the value of
287
- # `nextPageToken` from the previous response. The values of other method
288
- # parameters should be identical to those in the previous call.
289
279
  # @!attribute [rw] resource_names
290
280
  # @return [::Array<::String>]
291
- # Optional. The resource name that owns the logs:
281
+ # Optional. List of resource names to list logs for:
292
282
  #
293
283
  # * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
294
284
  # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
@@ -301,6 +291,19 @@ module Google
301
291
  # * `organizations/[ORGANIZATION_ID]`
302
292
  # * `billingAccounts/[BILLING_ACCOUNT_ID]`
303
293
  # * `folders/[FOLDER_ID]`
294
+ #
295
+ # The resource name in the `parent` field is added to this list.
296
+ # @!attribute [rw] page_size
297
+ # @return [::Integer]
298
+ # Optional. The maximum number of results to return from this request.
299
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
300
+ # response indicates that more results might be available.
301
+ # @!attribute [rw] page_token
302
+ # @return [::String]
303
+ # Optional. If present, then retrieve the next batch of results from the
304
+ # preceding call to this method. `pageToken` must be the value of
305
+ # `nextPageToken` from the previous response. The values of other method
306
+ # parameters should be identical to those in the previous call.
304
307
  class ListLogsRequest
305
308
  include ::Google::Protobuf::MessageExts
306
309
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -340,13 +343,11 @@ module Google
340
343
  # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
341
344
  # @!attribute [rw] filter
342
345
  # @return [::String]
343
- # Optional. A filter that chooses which log entries to return. See [Advanced
344
- # Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
345
- # Only log entries that match the filter are returned. An empty filter
346
- # matches all log entries in the resources listed in `resource_names`.
347
- # Referencing a parent resource that is not in `resource_names` will cause
348
- # the filter to return no results. The maximum length of the filter is 20000
349
- # characters.
346
+ # Optional. Only log entries that match the filter are returned. An empty
347
+ # filter matches all log entries in the resources listed in `resource_names`.
348
+ # Referencing a parent resource that is not listed in `resource_names` will
349
+ # cause the filter to return no results. The maximum length of a filter is
350
+ # 20,000 characters.
350
351
  # @!attribute [rw] buffer_window
351
352
  # @return [::Google::Protobuf::Duration]
352
353
  # Optional. The amount of time to buffer log entries at the server before