google-cloud-logging 0.24.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/lib/google/cloud/logging.rb +5 -6
  4. data/lib/google/cloud/logging/entry.rb +28 -2
  5. data/lib/google/cloud/logging/entry/list.rb +6 -6
  6. data/lib/google/cloud/logging/entry/operation.rb +1 -1
  7. data/lib/google/cloud/logging/entry/source_location.rb +86 -0
  8. data/lib/google/cloud/logging/log/list.rb +155 -0
  9. data/lib/google/cloud/logging/metric/list.rb +6 -6
  10. data/lib/google/cloud/logging/middleware.rb +27 -23
  11. data/lib/google/cloud/logging/project.rb +46 -3
  12. data/lib/google/cloud/logging/rails.rb +37 -20
  13. data/lib/google/cloud/logging/resource_descriptor/list.rb +6 -6
  14. data/lib/google/cloud/logging/service.rb +15 -0
  15. data/lib/google/cloud/logging/sink/list.rb +6 -6
  16. data/lib/google/cloud/logging/v2/config_service_v2_client.rb +24 -13
  17. data/lib/google/cloud/logging/v2/config_service_v2_client_config.json +3 -1
  18. data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +12 -6
  19. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +26 -12
  20. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +23 -12
  21. data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +13 -3
  22. data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +6 -0
  23. data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +3 -5
  24. data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +43 -27
  25. data/lib/google/cloud/logging/v2/logging_service_v2_client_config.json +6 -4
  26. data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +3 -2
  27. data/lib/google/cloud/logging/v2/metrics_service_v2_client_config.json +3 -1
  28. data/lib/google/cloud/logging/version.rb +1 -1
  29. data/lib/google/logging/v2/logging_config_services_pb.rb +1 -1
  30. data/lib/google/logging/v2/logging_metrics_pb.rb +2 -0
  31. data/lib/google/logging/v2/logging_metrics_services_pb.rb +1 -1
  32. data/lib/google/logging/v2/logging_services_pb.rb +5 -4
  33. metadata +9 -7
@@ -108,6 +108,16 @@ module Google
108
108
  # both are provided. Otherwise, construct a default monitored resource
109
109
  # based on the current environment.
110
110
  #
111
+ # @param [String] type Type of Google::Cloud::Logging::Resource
112
+ # @param [Hash<String, String>] labels Metadata lebels of
113
+ # Google::Cloud::Logging::Resource
114
+ #
115
+ # @return [Google::Cloud::Logging::Resource] An Resource object with
116
+ # type and labels
117
+ #
118
+ # @see https://cloud.google.com/logging/docs/api/v2/resource-list
119
+ # Monitored Resources and Services
120
+ #
111
121
  # @example If both type and labels are provided, it returns resource:
112
122
  # rc = Google::Cloud::Logging::Middleware.build_monitored_resource(
113
123
  # "aws_ec2_instance",
@@ -142,15 +152,6 @@ module Google
142
152
  # rc.type #=> "global"
143
153
  # rc.labels #=> {}
144
154
  #
145
- # Reference https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource
146
- # for a full list of monitoring resources
147
- #
148
- # @param [String] type Type of Google::Cloud::Logging::Resource
149
- # @param [Hash<String, String>] labels Metadata lebels of
150
- # Google::Cloud::Logging::Resource
151
- #
152
- # @return [Google::Cloud::Logging::Resource] An Resource object with
153
- # type and labels
154
155
  def self.build_monitored_resource type = nil, labels = nil
155
156
  if type && labels
156
157
  Google::Cloud::Logging::Resource.new.tap do |r|
@@ -166,6 +167,12 @@ module Google
166
167
  # @private Extract information from current environment and construct
167
168
  # the correct monitoring resource types and labels.
168
169
  #
170
+ # @return [Google::Cloud::Logging::Resource] An Resource object with
171
+ # correct type and labels
172
+ #
173
+ # @see https://cloud.google.com/logging/docs/api/v2/resource-list
174
+ # Monitored Resources and Services
175
+ #
169
176
  # @example If running from GAE, returns default resource:
170
177
  # rc = Google::Cloud::Logging::Middleware.send \
171
178
  # :default_monitored_resource
@@ -193,25 +200,22 @@ module Google
193
200
  # rc.type #=> "global"
194
201
  # rc.labels #=> {}
195
202
  #
196
- # Reference https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource
197
- # for a full list of monitoring resources
198
- #
199
- # @return [Google::Cloud::Logging::Resource] An Resource object with
200
- # correct type and labels
201
203
  def self.default_monitored_resource
202
204
  type, labels =
203
- if Core::Environment.gae?
205
+ if Google::Cloud.env.app_engine?
204
206
  ["gae_app", {
205
- module_id: Core::Environment.gae_module_id,
206
- version_id: Core::Environment.gae_module_version }]
207
- elsif Core::Environment.gke?
207
+ module_id: Google::Cloud.env.app_engine_service_id,
208
+ version_id: Google::Cloud.env.app_engine_service_version }]
209
+ elsif Google::Cloud.env.container_engine?
208
210
  ["container", {
209
- cluster_name: Core::Environment.gke_cluster_name,
210
- namespace_id: Core::Environment.gke_namespace_id || "default" }]
211
- elsif Core::Environment.gce?
211
+ cluster_name: Google::Cloud.env.container_engine_cluster_name,
212
+ namespace_id: \
213
+ Google::Cloud.env.container_engine_namespace_id || "default"
214
+ }]
215
+ elsif Google::Cloud.env.compute_engine?
212
216
  ["gce_instance", {
213
- instance_id: Core::Environment.instance_id,
214
- zone: Core::Environment.instance_zone }]
217
+ instance_id: Google::Cloud.env.instance_name,
218
+ zone: Google::Cloud.env.instance_zone }]
215
219
  else
216
220
  ["global", {}]
217
221
  end
@@ -14,9 +14,10 @@
14
14
 
15
15
 
16
16
  require "google/cloud/errors"
17
- require "google/cloud/core/environment"
17
+ require "google/cloud/env"
18
18
  require "google/cloud/logging/service"
19
19
  require "google/cloud/logging/credentials"
20
+ require "google/cloud/logging/log/list"
20
21
  require "google/cloud/logging/entry"
21
22
  require "google/cloud/logging/resource_descriptor"
22
23
  require "google/cloud/logging/sink"
@@ -81,7 +82,7 @@ module Google
81
82
  ENV["LOGGING_PROJECT"] ||
82
83
  ENV["GOOGLE_CLOUD_PROJECT"] ||
83
84
  ENV["GCLOUD_PROJECT"] ||
84
- Google::Cloud::Core::Environment.project_id
85
+ Google::Cloud.env.project_id
85
86
  end
86
87
 
87
88
  ##
@@ -127,7 +128,7 @@ module Google
127
128
  # require "google/cloud/logging"
128
129
  #
129
130
  # logging = Google::Cloud::Logging.new
130
- # entries = logging.entries filter: "log:syslog"
131
+ # entries = logging.entries filter: "logName:syslog"
131
132
  # entries.each do |e|
132
133
  # puts "[#{e.timestamp}] #{e.payload.inspect}"
133
134
  # end
@@ -382,6 +383,48 @@ module Google
382
383
  Logger.new shared_async_writer, log_name, resource, labels
383
384
  end
384
385
 
386
+ ##
387
+ # Lists log names. Use this method to retrieve log names from Cloud
388
+ # Logging.
389
+ #
390
+ # @param [String] resource The cloud resource from which to retrieve log
391
+ # names. Optional. If `nil`, the ID of the receiving project instance
392
+ # will be used. Examples: `"projects/my-project-1A"`,
393
+ # `"projects/1234567890"`.
394
+ # @param [String] token A previously-returned page token representing
395
+ # part of the larger set of results to view.
396
+ # @param [Integer] max Maximum number of log names to return.
397
+ #
398
+ # @return [Array<String>] A list of log names. For example,
399
+ # `projects/my-project/syslog` or
400
+ # `organizations/123/cloudresourcemanager.googleapis.com%2Factivity`.
401
+ # (See {Google::Cloud::Logging::Log::List})
402
+ #
403
+ # @example
404
+ # require "google/cloud/logging"
405
+ #
406
+ # logging = Google::Cloud::Logging.new
407
+ # logs = logging.logs
408
+ # logs.each { |l| puts l }
409
+ #
410
+ # @example Retrieve all log names: (See {Log::List#all})
411
+ # require "google/cloud/logging"
412
+ #
413
+ # logging = Google::Cloud::Logging.new
414
+ # logs = logging.logs
415
+ #
416
+ # logs.all { |l| puts l }
417
+ #
418
+ def logs resource: nil, token: nil, max: nil
419
+ ensure_service!
420
+ list_grpc = service.list_logs resource: resource, token: token,
421
+ max: max
422
+ Log::List.from_grpc list_grpc, service, resource: resource, max: max
423
+ end
424
+ alias_method :find_logs, :logs
425
+ alias_method :log_names, :logs
426
+ alias_method :find_log_names, :logs
427
+
385
428
  ##
386
429
  # Deletes a log and all its log entries. The log will reappear if it
387
430
  # receives new entries.
@@ -24,25 +24,33 @@ module Google
24
24
  ##
25
25
  # Railtie
26
26
  #
27
- # Google::Cloud::Logging::Railtie automatically add the
28
- # Google::Cloud::Logging::Middleware to Rack in a Rails environment.
29
- # The middleware will set env['rack.logger'] to a
30
- # Google::Cloud::Logging::Logger instance to be used by the Rails
27
+ # Adds the {Google::Cloud::Logging::Middleware} to Rack in a Rails
28
+ # environment. The middleware will set `env['rack.logger']` to a
29
+ # {Google::Cloud::Logging::Logger} instance to be used by the Rails
31
30
  # application.
32
31
  #
33
32
  # The Middleware is only added when certain conditions are met. See
34
- # {use_logging?} for detail.
33
+ # {use_logging?} for details.
34
+ #
35
+ # When loaded, the {Google::Cloud::Logging::Middleware} will be inserted
36
+ # before the `Rails::Rack::Logger Middleware`, which allows it to set the
37
+ # `env['rack.logger']` in place of Rails's default logger. The Railtie
38
+ # will also initialize the logger with correct GCP `project_id`
39
+ # and `keyfile` if they are defined in the Rails `environment.rb` file as
40
+ # follows:
41
+ #
42
+ # ```ruby
43
+ # config.google_cloud.logging.project_id = "my-gcp-project"
44
+ # config.google_cloud.logging.keyfile = "/path/to/secret.json"
45
+ # ```
35
46
  #
36
- # When loaded, the Google::Cloud::Logging::Middleware will be inserted
37
- # before the Rails::Rack::Logger Middleware, which allows it to set the
38
- # env['rack.logger'] in place of Rails's default logger. The Railtie
39
- # should also initialize the logger with correct GCP project_id
40
- # and keyfile if they are defined in Rails environment.rb as follow:
41
- # config.google_cloud.logging.project_id = "my-gcp-project"
42
- # config.google_cloud.logging.keyfile = "/path/to/secret.json"
43
47
  # or
44
- # config.google_cloud.project_id = "my-gcp-project"
45
- # config.google_cloud.keyfile = "/path/to/secret.json"
48
+ #
49
+ # ```ruby
50
+ # config.google_cloud.project_id = "my-gcp-project"
51
+ # config.google_cloud.keyfile = "/path/to/secret.json"
52
+ # ```
53
+ #
46
54
  # If omitted, project_id will be initialized with default environment
47
55
  # variables.
48
56
  #
@@ -82,18 +90,27 @@ module Google
82
90
  ##
83
91
  # Determine whether to use Stackdriver Logging or not.
84
92
  #
85
- # Returns true if valid GCP project_id is provided and underneath API is
86
- # able to authenticate. Also either Rails needs to be in "production"
87
- # environment or config.stackdriver.use_logging is explicitly true.
93
+ # Returns `true` if Stackdriver Logging is enabled for this application.
94
+ # That is, if all of the following are true:
95
+ #
96
+ # * A valid GCP `project_id` is available, either because the
97
+ # application is hosted on Google Cloud or because it is set in the
98
+ # configuration.
99
+ # * The API is able to authenticate, again either because the
100
+ # application is hosted on Google Cloud or because an appropriate
101
+ # keyfile is provided in the configuration.
102
+ # * Either the Rails environment is set to `production` or the
103
+ # `config.google_cloud.use_logging` configuration is explicitly set to
104
+ # `true`.
88
105
  #
89
106
  # @param [Rails::Railtie::Configuration] config The
90
- # Rails.application.config
107
+ # `Rails.application.config`
91
108
  #
92
109
  # @return [Boolean] Whether to use Stackdriver Logging
93
110
  #
94
111
  def self.use_logging? config
95
112
  gcp_config = config.google_cloud
96
- # Return false if config.stackdriver.use_logging is explicitly false
113
+ # Return false if config.google_cloud.use_logging is explicitly false
97
114
  return false if gcp_config.key?(:use_logging) &&
98
115
  !gcp_config.use_logging
99
116
 
@@ -118,7 +135,7 @@ module Google
118
135
  end
119
136
 
120
137
  # Otherwise default to true if Rails is running in production or
121
- # config.stackdriver.use_logging is true
138
+ # config.google_cloud.use_logging is true
122
139
  Rails.env.production? || gcp_config.use_logging
123
140
  end
124
141
  end
@@ -78,15 +78,15 @@ module Google
78
78
  end
79
79
 
80
80
  ##
81
- # Retrieves all resource descriptors by repeatedly loading {#next}
82
- # until {#next?} returns `false`. Calls the given block once for each
83
- # resource descriptor, which is passed as the parameter.
81
+ # Retrieves remaining results by repeatedly invoking {#next} until
82
+ # {#next?} returns `false`. Calls the given block once for each
83
+ # result, which is passed as the argument to the block.
84
84
  #
85
85
  # An Enumerator is returned if no block is given.
86
86
  #
87
- # This method may make several API calls until all resource
88
- # descriptors are retrieved. Be sure to use as narrow a search
89
- # criteria as possible. Please use with caution.
87
+ # This method will make repeated API calls until all remaining results
88
+ # are retrieved. (Unlike `#each`, for example, which merely iterates
89
+ # over the results returned by a single API call.) Use with caution.
90
90
  #
91
91
  # @param [Integer] request_limit The upper limit of API requests to
92
92
  # make to load all resource descriptors. Default is no limit.
@@ -129,6 +129,21 @@ module Google
129
129
  end
130
130
  end
131
131
 
132
+ def list_logs resource: nil, token: nil, max: nil
133
+ parent = resource || "projects/#{@project}"
134
+ call_opts = default_options
135
+ if token
136
+ call_opts = Google::Gax::CallOptions.new(kwargs: default_headers,
137
+ page_token: token)
138
+ end
139
+
140
+ execute do
141
+ paged_enum = logging.list_logs parent, page_size: max,
142
+ options: call_opts
143
+ paged_enum.page.response
144
+ end
145
+ end
146
+
132
147
  def delete_log name
133
148
  execute do
134
149
  logging.delete_log log_path(name), options: default_options
@@ -75,15 +75,15 @@ module Google
75
75
  end
76
76
 
77
77
  ##
78
- # Retrieves all sinks by repeatedly loading {#next} until {#next?}
79
- # returns `false`. Calls the given block once for each sink, which is
80
- # passed as the parameter.
78
+ # Retrieves remaining results by repeatedly invoking {#next} until
79
+ # {#next?} returns `false`. Calls the given block once for each
80
+ # result, which is passed as the argument to the block.
81
81
  #
82
82
  # An Enumerator is returned if no block is given.
83
83
  #
84
- # This method may make several API calls until all sinks are
85
- # retrieved. Be sure to use as narrow a search criteria as possible.
86
- # Please use with caution.
84
+ # This method will make repeated API calls until all remaining results
85
+ # are retrieved. (Unlike `#each`, for example, which merely iterates
86
+ # over the results returned by a single API call.) Use with caution.
87
87
  #
88
88
  # @param [Integer] request_limit The upper limit of API requests to
89
89
  # make to load all sinks. Default is no limit.
@@ -1,10 +1,10 @@
1
- # Copyright 2016 Google Inc. All rights reserved.
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
5
5
  # You may obtain a copy of the License at
6
6
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
8
  #
9
9
  # Unless required by applicable law or agreed to in writing, software
10
10
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +26,7 @@ require "json"
26
26
  require "pathname"
27
27
 
28
28
  require "google/gax"
29
+
29
30
  require "google/logging/v2/logging_config_pb"
30
31
 
31
32
  module Google
@@ -216,8 +217,12 @@ module Google
216
217
  # Lists sinks.
217
218
  #
218
219
  # @param parent [String]
219
- # Required. The parent resource whose sinks are to be listed.
220
- # Examples: +"projects/my-logging-project"+, +"organizations/123456789"+.
220
+ # Required. The parent resource whose sinks are to be listed:
221
+ #
222
+ # "projects/[PROJECT_ID]"
223
+ # "organizations/[ORGANIZATION_ID]"
224
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
225
+ # "folders/[FOLDER_ID]"
221
226
  # @param page_size [Integer]
222
227
  # The maximum number of resources contained in the underlying API
223
228
  # response. If page streaming is performed per-resource, this
@@ -268,10 +273,12 @@ module Google
268
273
  # Gets a sink.
269
274
  #
270
275
  # @param sink_name [String]
271
- # Required. The parent resource name of the sink:
276
+ # Required. The resource name of the sink:
272
277
  #
273
278
  # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
274
279
  # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
280
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
281
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
275
282
  #
276
283
  # Example: +"projects/my-project-id/sinks/my-sink-id"+.
277
284
  # @param options [Google::Gax::CallOptions]
@@ -308,6 +315,8 @@ module Google
308
315
  #
309
316
  # "projects/[PROJECT_ID]"
310
317
  # "organizations/[ORGANIZATION_ID]"
318
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
319
+ # "folders/[FOLDER_ID]"
311
320
  #
312
321
  # Examples: +"projects/my-logging-project"+, +"organizations/123456789"+.
313
322
  # @param sink [Google::Logging::V2::LogSink]
@@ -317,9 +326,9 @@ module Google
317
326
  # Optional. Determines the kind of IAM identity returned as +writer_identity+
318
327
  # in the new sink. If this value is omitted or set to false, and if the
319
328
  # sink's parent is a project, then the value returned as +writer_identity+ is
320
- # +cloud-logs@google.com+, the same identity used before the addition of
321
- # writer identities to this API. The sink's destination must be in the same
322
- # project as the sink itself.
329
+ # the same group or service account used by Stackdriver Logging before the
330
+ # addition of writer identities to this API. The sink's destination must be
331
+ # in the same project as the sink itself.
323
332
  #
324
333
  # If this field is set to true, or if the sink is owned by a non-project
325
334
  # resource such as an organization, then the value of +writer_identity+ will
@@ -369,6 +378,8 @@ module Google
369
378
  #
370
379
  # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
371
380
  # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
381
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
382
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
372
383
  #
373
384
  # Example: +"projects/my-project-id/sinks/my-sink-id"+.
374
385
  # @param sink [Google::Logging::V2::LogSink]
@@ -384,9 +395,9 @@ module Google
384
395
  #
385
396
  # + If the old and new values of this field are both false or both true,
386
397
  # then there is no change to the sink's +writer_identity+.
387
- # + If the old value was false and the new value is true, then
398
+ # + If the old value is false and the new value is true, then
388
399
  # +writer_identity+ is changed to a unique service account.
389
- # + It is an error if the old value was true and the new value is false.
400
+ # + It is an error if the old value is true and the new value is false.
390
401
  # @param options [Google::Gax::CallOptions]
391
402
  # Overrides the default settings for this call, e.g, timeout,
392
403
  # retries, etc.
@@ -425,10 +436,10 @@ module Google
425
436
  #
426
437
  # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
427
438
  # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
439
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
440
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
428
441
  #
429
- # It is an error if the sink does not exist. Example:
430
- # +"projects/my-project-id/sinks/my-sink-id"+. It is an error if
431
- # the sink does not exist.
442
+ # Example: +"projects/my-project-id/sinks/my-sink-id"+.
432
443
  # @param options [Google::Gax::CallOptions]
433
444
  # Overrides the default settings for this call, e.g, timeout,
434
445
  # retries, etc.
@@ -6,7 +6,9 @@
6
6
  "DEADLINE_EXCEEDED",
7
7
  "UNAVAILABLE"
8
8
  ],
9
- "non_idempotent": []
9
+ "non_idempotent": [
10
+ "UNAVAILABLE"
11
+ ]
10
12
  },
11
13
  "retry_params": {
12
14
  "default": {
@@ -22,6 +22,8 @@ module Google
22
22
  #
23
23
  # "projects/[PROJECT_ID]/logs/[LOG_ID]"
24
24
  # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
25
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
26
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
25
27
  #
26
28
  # +[LOG_ID]+ must be URL-encoded within +log_name+. Example:
27
29
  # +"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"+.
@@ -55,18 +57,22 @@ module Google
55
57
  # @!attribute [rw] timestamp
56
58
  # @return [Google::Protobuf::Timestamp]
57
59
  # Optional. The time the event described by the log entry occurred. If
58
- # omitted, Stackdriver Logging will use the time the log entry is received.
60
+ # omitted in a new log entry, Stackdriver Logging will insert the time the
61
+ # log entry is received. Stackdriver Logging might reject log entries whose
62
+ # time stamps are more than a couple of hours in the future. Log entries
63
+ # with time stamps in the past are accepted.
59
64
  # @!attribute [rw] severity
60
65
  # @return [Google::Logging::Type::LogSeverity]
61
66
  # Optional. The severity of the log entry. The default value is
62
67
  # +LogSeverity.DEFAULT+.
63
68
  # @!attribute [rw] insert_id
64
69
  # @return [String]
65
- # Optional. A unique ID for the log entry. If you provide this
66
- # field, the logging service considers other log entries in the
67
- # same project with the same ID as duplicates which can be removed. If
68
- # omitted, Stackdriver Logging will generate a unique ID for this
69
- # log entry.
70
+ # Optional. A unique identifier for the log entry. If you provide a value,
71
+ # then Stackdriver Logging considers other log entries in the same project,
72
+ # with the same +timestamp+, and with the same +insert_id+ to be duplicates
73
+ # which can be removed. If omitted in new log entries, then Stackdriver
74
+ # Logging will insert its own unique identifier. The +insert_id+ is used
75
+ # to order log entries that have the same +timestamp+ value.
70
76
  # @!attribute [rw] http_request
71
77
  # @return [Google::Logging::Type::HttpRequest]
72
78
  # Optional. Information about the HTTP request associated with this