google-cloud-logging 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/INSTRUMENTATION.md +1 -1
  4. data/LOGGING.md +1 -1
  5. data/lib/google-cloud-logging.rb +1 -1
  6. data/lib/google/cloud/logging.rb +1 -1
  7. data/lib/google/cloud/logging/logger.rb +27 -18
  8. data/lib/google/cloud/logging/middleware.rb +1 -1
  9. data/lib/google/cloud/logging/rails.rb +1 -1
  10. data/lib/google/cloud/logging/v2/config_service_v2_client.rb +35 -35
  11. data/lib/google/cloud/logging/v2/doc/google/api/distribution.rb +18 -18
  12. data/lib/google/cloud/logging/v2/doc/google/api/metric.rb +69 -48
  13. data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +20 -21
  14. data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +5 -5
  15. data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +17 -17
  16. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +50 -50
  17. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +55 -55
  18. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +28 -28
  19. data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +8 -8
  20. data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +3 -3
  21. data/lib/google/cloud/logging/v2/doc/google/protobuf/empty.rb +1 -1
  22. data/lib/google/cloud/logging/v2/doc/google/protobuf/field_mask.rb +7 -7
  23. data/lib/google/cloud/logging/v2/doc/google/protobuf/struct.rb +11 -11
  24. data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +7 -7
  25. data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +27 -27
  26. data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +4 -4
  27. data/lib/google/cloud/logging/version.rb +1 -1
  28. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c186c4f38de2474a1a806259d215e3613ccea28d09011b3ad7b9c08421aae52f
4
- data.tar.gz: d17ddc92fd9783853bb4efb7edba4be0aaa6bea9f45bb8d04147a17f6f8c191e
3
+ metadata.gz: 5cabe641ea9b231603ff1ec5dd90876723acbb111fa200a293fd661ef2cb9c1d
4
+ data.tar.gz: 4b828ba6797ba1465a594deca80e4eff19f8d020a1471057b46a521df787a13b
5
5
  SHA512:
6
- metadata.gz: 5e8c71b129fa26d8f3061fee8e7f66dca3942467cf844f650d47322f586d18c9a381251f7afd05767f22b87b81538182a8ae6cc82aa4003e98e0e7feee7d8ca6
7
- data.tar.gz: e13b593778894c9df313fb513ef9c16496961243342ac36523a12d98192fc65a82c5bfa740e5ec597d304805cf829eb39452f386d1900d0a30ee28e813aa60a8
6
+ metadata.gz: dcea1515ca1c9ec282d9db850646bc2279db32c59b6214d84a8656e9605ded07f0213f57f3e4884170fb43b5486110425f890cfff32da30604f6f342f524352a
7
+ data.tar.gz: 0f1f1586220415cd0ce7aa654f07dc779a5efebb22fbf79bbac1bea942c49a35dac0d814d7a20a21341fecc411108d467be41a5fd15cfcc99ed5aa08ad3996df
@@ -1,5 +1,14 @@
1
1
  # Release History
2
2
 
3
+ ### 1.5.5 / 2018-09-20
4
+
5
+ * Make Logger thread-safe.
6
+ * Update Logging generated files.
7
+ * Add Metric's MetricDescriptorMetadata.
8
+ * Update documentation.
9
+ * Change documentation URL to googleapis GitHub org.
10
+ * Fix circular require warning.
11
+
3
12
  ### 1.5.4 / 2018-09-12
4
13
 
5
14
  * Add missing documentation files to package.
@@ -16,7 +16,7 @@ if you want to run on a non Google Cloud environment or you want to customize
16
16
  the default behavior.
17
17
 
18
18
  See the
19
- [Configuration Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/stackdriver/guides/instrumentation_configuration)
19
+ [Configuration Guide](https://googleapis.github.io/google-cloud-ruby/#/docs/stackdriver/guides/instrumentation_configuration)
20
20
  for full configuration parameters.
21
21
 
22
22
  ## Using instrumentation with Ruby on Rails
data/LOGGING.md CHANGED
@@ -5,7 +5,7 @@ To enable logging for this library, set the logger for the underlying
5
5
  that you set may be a Ruby stdlib
6
6
  [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
7
7
  shown below, or a
8
- [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
8
+ [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
9
9
  that will write logs to [Stackdriver
10
10
  Logging](https://cloud.google.com/logging/). See
11
11
  [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
  gem "google-cloud-core"
23
- require "google/cloud"
23
+ require "google/cloud" unless defined? Google::Cloud.new
24
24
  require "google/cloud/config"
25
25
  require "googleauth"
26
26
 
@@ -138,7 +138,7 @@ module Google
138
138
  # Rack environment.
139
139
  #
140
140
  # See the [Configuration
141
- # Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
141
+ # Guide](https://googleapis.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
142
142
  # for full configuration parameters.
143
143
  #
144
144
  # @return [Google::Cloud::Config] The configuration object
@@ -14,6 +14,8 @@
14
14
 
15
15
 
16
16
  require "logger"
17
+ require "monitor"
18
+ require "thread"
17
19
 
18
20
  module Google
19
21
  module Cloud
@@ -51,6 +53,8 @@ module Google
51
53
  # logger.info payload
52
54
  #
53
55
  class Logger
56
+ include MonitorMixin
57
+
54
58
  ##
55
59
  # A RequestInfo represents data about the request being handled by the
56
60
  # current thread. It is used to configure logs coming from that thread.
@@ -121,7 +125,9 @@ module Google
121
125
  # @deprecated Use request_info
122
126
  #
123
127
  def trace_ids
124
- @request_info.inject({}) { |r, (k, v)| r[k] = v.trace_id }
128
+ synchronize do
129
+ @request_info_map.inject({}) { |r, (k, v)| r[k] = v.trace_id }
130
+ end
125
131
  end
126
132
 
127
133
  ##
@@ -166,7 +172,7 @@ module Google
166
172
  @resource = resource
167
173
  @labels = labels || {}
168
174
  @level = 0 # DEBUG is the default behavior
169
- @request_info = {}
175
+ @request_info_map = {}
170
176
  @closed = false
171
177
  # Unused, but present for API compatibility
172
178
  @formatter = ::Logger::Formatter.new
@@ -176,6 +182,8 @@ module Google
176
182
  # The writer is usually a Project or AsyncWriter.
177
183
  logging = @writer.respond_to?(:logging) ? @writer.logging : @writer
178
184
  @project = logging.project if logging.respond_to? :project
185
+
186
+ super() # to init MonitorMixin
179
187
  end
180
188
 
181
189
  ##
@@ -302,6 +310,8 @@ module Google
302
310
  # called when the logger is configured to show them.
303
311
  #
304
312
  def add severity, message = nil, progname = nil
313
+ return if @closed
314
+
305
315
  severity = derive_severity(severity) || ::Logger::UNKNOWN
306
316
  return true if severity < @level
307
317
 
@@ -430,7 +440,7 @@ module Google
430
440
  # @deprecated Use add_request_info
431
441
  #
432
442
  def add_trace_id trace_id
433
- add_request_id trace_id: trace_id
443
+ add_request_info trace_id: trace_id
434
444
  end
435
445
 
436
446
  ##
@@ -448,17 +458,17 @@ module Google
448
458
  # @param [Hash, nil] env The request's Rack environment or `nil` if not
449
459
  # available.
450
460
  #
451
- def add_request_info info: nil,
452
- env: nil,
453
- trace_id: nil,
454
- log_name: nil
461
+ def add_request_info info: nil, env: nil, trace_id: nil, log_name: nil
455
462
  info ||= RequestInfo.new trace_id, log_name, env
456
- @request_info[current_thread_id] = info
457
463
 
458
- # Start removing old entries if hash gets too large.
459
- # This should never happen, because middleware should automatically
460
- # remove entries when a request is finished
461
- @request_info.shift while @request_info.size > 10_000
464
+ synchronize do
465
+ @request_info_map[current_thread_id] = info
466
+
467
+ # Start removing old entries if hash gets too large.
468
+ # This should never happen, because middleware should automatically
469
+ # remove entries when a request is finished
470
+ @request_info_map.shift while @request_info_map.size > 10_000
471
+ end
462
472
 
463
473
  info
464
474
  end
@@ -470,7 +480,7 @@ module Google
470
480
  # or `nil` if there is no data set.
471
481
  #
472
482
  def request_info
473
- @request_info[current_thread_id]
483
+ synchronize { @request_info_map[current_thread_id] }
474
484
  end
475
485
 
476
486
  ##
@@ -479,7 +489,7 @@ module Google
479
489
  # @return [RequestInfo] The info that's being deleted
480
490
  #
481
491
  def delete_request_info
482
- @request_info.delete current_thread_id
492
+ synchronize { @request_info_map.delete current_thread_id }
483
493
  end
484
494
 
485
495
  ##
@@ -552,14 +562,13 @@ module Google
552
562
 
553
563
  writer.write_entries entry, log_name: actual_log_name,
554
564
  resource: resource,
555
- labels: entry_labels
565
+ labels: entry_labels(info)
556
566
  end
557
567
 
558
568
  ##
559
569
  # @private generate the labels hash for a log entry.
560
- def entry_labels
570
+ def entry_labels info
561
571
  merged_labels = {}
562
- info = request_info
563
572
 
564
573
  if info && !info.trace_id.nil?
565
574
  merged_labels["traceId"] = info.trace_id
@@ -568,7 +577,7 @@ module Google
568
577
  end
569
578
  end
570
579
 
571
- request_env = info && request_info.env || {}
580
+ request_env = info && info.env || {}
572
581
 
573
582
  compute_labels(request_env).merge(merged_labels)
574
583
  end
@@ -45,7 +45,7 @@ module Google
45
45
  # specified, a default logger with be used.
46
46
  # @param [Hash] kwargs Hash of configuration settings. Used for
47
47
  # backward API compatibility. See the [Configuration
48
- # Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
48
+ # Guide](https://googleapis.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
49
49
  # for the prefered way to set configuration parameters.
50
50
  #
51
51
  # @return [Google::Cloud::Logging::Middleware] A new
@@ -37,7 +37,7 @@ module Google
37
37
  # before the `Rails::Rack::Logger Middleware`, which allows it to set the
38
38
  # `env['rack.logger']` in place of Rails's default logger.
39
39
  # See the [Configuration
40
- # Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
40
+ # Guide](https://googleapis.github.io/google-cloud-ruby/docs/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION)
41
41
  # on how to configure the Railtie and Middleware.
42
42
  #
43
43
  class Railtie < ::Rails::Railtie
@@ -351,7 +351,7 @@ module Google
351
351
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
352
352
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
353
353
  #
354
- # Example: +"projects/my-project-id/sinks/my-sink-id"+.
354
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
355
355
  # @param options [Google::Gax::CallOptions]
356
356
  # Overrides the default settings for this call, e.g, timeout,
357
357
  # retries, etc.
@@ -380,7 +380,7 @@ module Google
380
380
 
381
381
  # Creates a sink that exports specified log entries to a destination. The
382
382
  # export of newly-ingested log entries begins immediately, unless the sink's
383
- # +writer_identity+ is not permitted to write to the destination. A sink can
383
+ # `writer_identity` is not permitted to write to the destination. A sink can
384
384
  # export log entries only from the resource owning the sink.
385
385
  #
386
386
  # @param parent [String]
@@ -391,24 +391,24 @@ module Google
391
391
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
392
392
  # "folders/[FOLDER_ID]"
393
393
  #
394
- # Examples: +"projects/my-logging-project"+, +"organizations/123456789"+.
394
+ # Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
395
395
  # @param sink [Google::Logging::V2::LogSink | Hash]
396
- # Required. The new sink, whose +name+ parameter is a sink identifier that
396
+ # Required. The new sink, whose `name` parameter is a sink identifier that
397
397
  # is not already in use.
398
398
  # A hash of the same form as `Google::Logging::V2::LogSink`
399
399
  # can also be provided.
400
400
  # @param unique_writer_identity [true, false]
401
- # Optional. Determines the kind of IAM identity returned as +writer_identity+
401
+ # Optional. Determines the kind of IAM identity returned as `writer_identity`
402
402
  # in the new sink. If this value is omitted or set to false, and if the
403
- # sink's parent is a project, then the value returned as +writer_identity+ is
403
+ # sink's parent is a project, then the value returned as `writer_identity` is
404
404
  # the same group or service account used by Stackdriver Logging before the
405
405
  # addition of writer identities to this API. The sink's destination must be
406
406
  # in the same project as the sink itself.
407
407
  #
408
408
  # If this field is set to true, or if the sink is owned by a non-project
409
- # resource such as an organization, then the value of +writer_identity+ will
409
+ # resource such as an organization, then the value of `writer_identity` will
410
410
  # be a unique service account used only for exports from the new sink. For
411
- # more information, see +writer_identity+ in {Google::Logging::V2::LogSink LogSink}.
411
+ # more information, see `writer_identity` in {Google::Logging::V2::LogSink LogSink}.
412
412
  # @param options [Google::Gax::CallOptions]
413
413
  # Overrides the default settings for this call, e.g, timeout,
414
414
  # retries, etc.
@@ -423,7 +423,7 @@ module Google
423
423
  # config_service_v2_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
424
424
  # formatted_parent = Google::Cloud::Logging::V2::ConfigServiceV2Client.project_path("[PROJECT]")
425
425
  #
426
- # # TODO: Initialize +sink+:
426
+ # # TODO: Initialize `sink`:
427
427
  # sink = {}
428
428
  # response = config_service_v2_client.create_sink(formatted_parent, sink)
429
429
 
@@ -443,9 +443,9 @@ module Google
443
443
  end
444
444
 
445
445
  # Updates a sink. This method replaces the following fields in the existing
446
- # sink with values from the new sink: +destination+, and +filter+.
447
- # The updated sink might also have a new +writer_identity+; see the
448
- # +unique_writer_identity+ field.
446
+ # sink with values from the new sink: `destination`, and `filter`.
447
+ # The updated sink might also have a new `writer_identity`; see the
448
+ # `unique_writer_identity` field.
449
449
  #
450
450
  # @param sink_name [String]
451
451
  # Required. The full resource name of the sink to update, including the
@@ -456,29 +456,29 @@ module Google
456
456
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
457
457
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
458
458
  #
459
- # Example: +"projects/my-project-id/sinks/my-sink-id"+.
459
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
460
460
  # @param sink [Google::Logging::V2::LogSink | Hash]
461
461
  # Required. The updated sink, whose name is the same identifier that appears
462
- # as part of +sink_name+.
462
+ # as part of `sink_name`.
463
463
  # A hash of the same form as `Google::Logging::V2::LogSink`
464
464
  # can also be provided.
465
465
  # @param unique_writer_identity [true, false]
466
466
  # Optional. See
467
467
  # [sinks.create](https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create)
468
468
  # for a description of this field. When updating a sink, the effect of this
469
- # field on the value of +writer_identity+ in the updated sink depends on both
469
+ # field on the value of `writer_identity` in the updated sink depends on both
470
470
  # the old and new values of this field:
471
471
  #
472
472
  # * If the old and new values of this field are both false or both true,
473
- # then there is no change to the sink's +writer_identity+.
473
+ # then there is no change to the sink's `writer_identity`.
474
474
  # * If the old value is false and the new value is true, then
475
- # +writer_identity+ is changed to a unique service account.
475
+ # `writer_identity` is changed to a unique service account.
476
476
  # * It is an error if the old value is true and the new value is
477
477
  # set to false or defaulted to false.
478
478
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
479
- # Optional. Field mask that specifies the fields in +sink+ that need
479
+ # Optional. Field mask that specifies the fields in `sink` that need
480
480
  # an update. A sink field will be overwritten if, and only if, it is
481
- # in the update mask. +name+ and output only fields cannot be updated.
481
+ # in the update mask. `name` and output only fields cannot be updated.
482
482
  #
483
483
  # An empty updateMask is temporarily treated as using the following mask
484
484
  # for backwards compatibility purposes:
@@ -486,10 +486,10 @@ module Google
486
486
  # At some point in the future, behavior will be removed and specifying an
487
487
  # empty updateMask will be an error.
488
488
  #
489
- # For a detailed +FieldMask+ definition, see
489
+ # For a detailed `FieldMask` definition, see
490
490
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
491
491
  #
492
- # Example: +updateMask=filter+.
492
+ # Example: `updateMask=filter`.
493
493
  # A hash of the same form as `Google::Protobuf::FieldMask`
494
494
  # can also be provided.
495
495
  # @param options [Google::Gax::CallOptions]
@@ -506,7 +506,7 @@ module Google
506
506
  # config_service_v2_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
507
507
  # formatted_sink_name = Google::Cloud::Logging::V2::ConfigServiceV2Client.sink_path("[PROJECT]", "[SINK]")
508
508
  #
509
- # # TODO: Initialize +sink+:
509
+ # # TODO: Initialize `sink`:
510
510
  # sink = {}
511
511
  # response = config_service_v2_client.update_sink(formatted_sink_name, sink)
512
512
 
@@ -527,7 +527,7 @@ module Google
527
527
  @update_sink.call(req, options, &block)
528
528
  end
529
529
 
530
- # Deletes a sink. If the sink has a unique +writer_identity+, then that
530
+ # Deletes a sink. If the sink has a unique `writer_identity`, then that
531
531
  # service account is also deleted.
532
532
  #
533
533
  # @param sink_name [String]
@@ -539,7 +539,7 @@ module Google
539
539
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
540
540
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
541
541
  #
542
- # Example: +"projects/my-project-id/sinks/my-sink-id"+.
542
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
543
543
  # @param options [Google::Gax::CallOptions]
544
544
  # Overrides the default settings for this call, e.g, timeout,
545
545
  # retries, etc.
@@ -635,7 +635,7 @@ module Google
635
635
  # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
636
636
  # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
637
637
  #
638
- # Example: +"projects/my-project-id/exclusions/my-exclusion-id"+.
638
+ # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
639
639
  # @param options [Google::Gax::CallOptions]
640
640
  # Overrides the default settings for this call, e.g, timeout,
641
641
  # retries, etc.
@@ -674,9 +674,9 @@ module Google
674
674
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
675
675
  # "folders/[FOLDER_ID]"
676
676
  #
677
- # Examples: +"projects/my-logging-project"+, +"organizations/123456789"+.
677
+ # Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
678
678
  # @param exclusion [Google::Logging::V2::LogExclusion | Hash]
679
- # Required. The new exclusion, whose +name+ parameter is an exclusion name
679
+ # Required. The new exclusion, whose `name` parameter is an exclusion name
680
680
  # that is not already used in the parent resource.
681
681
  # A hash of the same form as `Google::Logging::V2::LogExclusion`
682
682
  # can also be provided.
@@ -694,7 +694,7 @@ module Google
694
694
  # config_service_v2_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
695
695
  # formatted_parent = Google::Cloud::Logging::V2::ConfigServiceV2Client.project_path("[PROJECT]")
696
696
  #
697
- # # TODO: Initialize +exclusion+:
697
+ # # TODO: Initialize `exclusion`:
698
698
  # exclusion = {}
699
699
  # response = config_service_v2_client.create_exclusion(formatted_parent, exclusion)
700
700
 
@@ -721,20 +721,20 @@ module Google
721
721
  # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
722
722
  # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
723
723
  #
724
- # Example: +"projects/my-project-id/exclusions/my-exclusion-id"+.
724
+ # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
725
725
  # @param exclusion [Google::Logging::V2::LogExclusion | Hash]
726
726
  # Required. New values for the existing exclusion. Only the fields specified
727
- # in +update_mask+ are relevant.
727
+ # in `update_mask` are relevant.
728
728
  # A hash of the same form as `Google::Logging::V2::LogExclusion`
729
729
  # can also be provided.
730
730
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
731
731
  # Required. A nonempty list of fields to change in the existing exclusion.
732
732
  # New values for the fields are taken from the corresponding fields in the
733
733
  # {Google::Logging::V2::LogExclusion LogExclusion} included in this request. Fields not mentioned in
734
- # +update_mask+ are not changed and are ignored in the request.
734
+ # `update_mask` are not changed and are ignored in the request.
735
735
  #
736
736
  # For example, to change the filter and description of an exclusion,
737
- # specify an +update_mask+ of +"filter,description"+.
737
+ # specify an `update_mask` of `"filter,description"`.
738
738
  # A hash of the same form as `Google::Protobuf::FieldMask`
739
739
  # can also be provided.
740
740
  # @param options [Google::Gax::CallOptions]
@@ -751,10 +751,10 @@ module Google
751
751
  # config_service_v2_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
752
752
  # formatted_name = Google::Cloud::Logging::V2::ConfigServiceV2Client.exclusion_path("[PROJECT]", "[EXCLUSION]")
753
753
  #
754
- # # TODO: Initialize +exclusion+:
754
+ # # TODO: Initialize `exclusion`:
755
755
  # exclusion = {}
756
756
  #
757
- # # TODO: Initialize +update_mask+:
757
+ # # TODO: Initialize `update_mask`:
758
758
  # update_mask = {}
759
759
  # response = config_service_v2_client.update_exclusion(formatted_name, exclusion, update_mask)
760
760
 
@@ -783,7 +783,7 @@ module Google
783
783
  # "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
784
784
  # "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
785
785
  #
786
- # Example: +"projects/my-project-id/exclusions/my-exclusion-id"+.
786
+ # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
787
787
  # @param options [Google::Gax::CallOptions]
788
788
  # Overrides the default settings for this call, e.g, timeout,
789
789
  # retries, etc.
@@ -29,13 +29,13 @@ module Google
29
29
  #
30
30
  # Although it is not forbidden, it is generally a bad idea to include
31
31
  # non-finite values (infinities or NaNs) in the population of values, as this
32
- # will render the +mean+ and +sum_of_squared_deviation+ fields meaningless.
32
+ # will render the `mean` and `sum_of_squared_deviation` fields meaningless.
33
33
  # @!attribute [rw] count
34
34
  # @return [Integer]
35
35
  # The number of values in the population. Must be non-negative.
36
36
  # @!attribute [rw] mean
37
37
  # @return [Float]
38
- # The arithmetic mean of the values in the population. If +count+ is zero
38
+ # The arithmetic mean of the values in the population. If `count` is zero
39
39
  # then this field must be zero.
40
40
  # @!attribute [rw] sum_of_squared_deviation
41
41
  # @return [Float]
@@ -47,26 +47,26 @@ module Google
47
47
  # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
48
48
  # describes Welford's method for accumulating this sum in one pass.
49
49
  #
50
- # If +count+ is zero then this field must be zero.
50
+ # If `count` is zero then this field must be zero.
51
51
  # @!attribute [rw] range
52
52
  # @return [Google::Api::Distribution::Range]
53
53
  # If specified, contains the range of the population values. The field
54
- # must not be present if the +count+ is zero.
54
+ # must not be present if the `count` is zero.
55
55
  # @!attribute [rw] bucket_options
56
56
  # @return [Google::Api::Distribution::BucketOptions]
57
57
  # Defines the histogram bucket boundaries.
58
58
  # @!attribute [rw] bucket_counts
59
59
  # @return [Array<Integer>]
60
- # If +bucket_options+ is given, then the sum of the values in +bucket_counts+
61
- # must equal the value in +count+. If +bucket_options+ is not given, no
62
- # +bucket_counts+ fields may be given.
60
+ # If `bucket_options` is given, then the sum of the values in `bucket_counts`
61
+ # must equal the value in `count`. If `bucket_options` is not given, no
62
+ # `bucket_counts` fields may be given.
63
63
  #
64
64
  # Bucket counts are given in order under the numbering scheme described
65
65
  # above (the underflow bucket has number 0; the finite buckets, if any,
66
66
  # have numbers 1 through N-2; the overflow bucket has number N-1).
67
67
  #
68
- # The size of +bucket_counts+ must be no greater than N as defined in
69
- # +bucket_options+.
68
+ # The size of `bucket_counts` must be no greater than N as defined in
69
+ # `bucket_options`.
70
70
  #
71
71
  # Any suffix of trailing zero bucket_count fields may be omitted.
72
72
  class Distribution
@@ -80,9 +80,9 @@ module Google
80
80
  class Range; end
81
81
 
82
82
  # A Distribution may optionally contain a histogram of the values in the
83
- # population. The histogram is given in +bucket_counts+ as counts of values
83
+ # population. The histogram is given in `bucket_counts` as counts of values
84
84
  # that fall into one of a sequence of non-overlapping buckets. The sequence
85
- # of buckets is described by +bucket_options+.
85
+ # of buckets is described by `bucket_options`.
86
86
  #
87
87
  # A bucket specifies an inclusive lower bound and exclusive upper bound for
88
88
  # the values that are counted for that bucket. The upper bound of a bucket
@@ -97,11 +97,11 @@ module Google
97
97
  # +infinity. The finite buckets are so-called because both bounds are
98
98
  # finite.
99
99
  #
100
- # +BucketOptions+ describes bucket boundaries in one of three ways. Two
100
+ # `BucketOptions` describes bucket boundaries in one of three ways. Two
101
101
  # describe the boundaries by giving parameters for a formula to generate
102
102
  # boundaries and one gives the bucket boundaries explicitly.
103
103
  #
104
- # If +bucket_boundaries+ is not given, then no +bucket_counts+ may be given.
104
+ # If `bucket_boundaries` is not given, then no `bucket_counts` may be given.
105
105
  # @!attribute [rw] linear_buckets
106
106
  # @return [Google::Api::Distribution::BucketOptions::Linear]
107
107
  # The linear bucket.
@@ -116,8 +116,8 @@ module Google
116
116
  # overflow and underflow). Each bucket represents a constant absolute
117
117
  # uncertainty on the specific value in the bucket.
118
118
  #
119
- # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
120
- # bucket +i+:
119
+ # Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
120
+ # bucket `i`:
121
121
  #
122
122
  # Upper bound (0 <= i < N-1): offset + (width * i).
123
123
  # Lower bound (1 <= i < N): offset + (width * (i - 1)).
@@ -136,7 +136,7 @@ module Google
136
136
  # the value of the lower bound. Each bucket represents a constant relative
137
137
  # uncertainty on a specific value in the bucket.
138
138
  #
139
- # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
139
+ # Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
140
140
  # bucket i:
141
141
  #
142
142
  # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
@@ -154,13 +154,13 @@ module Google
154
154
 
155
155
  # A set of buckets with arbitrary widths.
156
156
  #
157
- # Defines +size(bounds) + 1+ (= N) buckets with these boundaries for
157
+ # Defines `size(bounds) + 1` (= N) buckets with these boundaries for
158
158
  # bucket i:
159
159
  #
160
160
  # Upper bound (0 <= i < N-1): bounds[i]
161
161
  # Lower bound (1 <= i < N); bounds[i - 1]
162
162
  #
163
- # There must be at least one element in +bounds+. If +bounds+ has only one
163
+ # There must be at least one element in `bounds`. If `bounds` has only one
164
164
  # element, there are no finite buckets, and that single element is the
165
165
  # common boundary of the overflow and underflow buckets.
166
166
  # @!attribute [rw] bounds