lib/google/cloud/logging/metric.rb in google-cloud-logging-0.20.1 vs lib/google/cloud/logging/metric.rb in google-cloud-logging-0.21.0

- old
+ new

@@ -30,14 +30,13 @@ # @see https://cloud.google.com/logging/docs/view/logs_based_metrics # Logs-based Metrics # @see https://cloud.google.com/monitoring/docs Google Cloud Monitoring # # @example - # require "google/cloud" + # require "google/cloud/logging" # - # gcloud = Google::Cloud.new - # logging = gcloud.logging + # logging = Google::Cloud::Logging.new # metric = logging.create_metric "errors", "severity>=ERROR" # class Metric ## # @private The gRPC Service object. @@ -93,14 +92,13 @@ ## # Updates the logs-based metric. # # @example - # require "google/cloud" + # require "google/cloud/logging" # - # gcloud = Google::Cloud.new - # logging = gcloud.logging + # logging = Google::Cloud::Logging.new # metric = logging.metric "severe_errors" # metric.filter = "logName:syslog AND severity>=ERROR" # metric.save # def save @@ -112,14 +110,13 @@ ## # Reloads the logs-based metric with current data from the Logging # service. # # @example - # require "google/cloud" + # require "google/cloud/logging" # - # gcloud = Google::Cloud.new - # logging = gcloud.logging + # logging = Google::Cloud::Logging.new # metric = logging.metric "severe_errors" # metric.filter = "Unwanted value" # metric.reload! # metric.filter #=> "logName:syslog" # @@ -134,13 +131,12 @@ # Permanently deletes the logs-based metric. # # @return [Boolean] Returns `true` if the metric was deleted. # # @example - # require "google/cloud" + # require "google/cloud/logging" # - # gcloud = Google::Cloud.new - # logging = gcloud.logging + # logging = Google::Cloud::Logging.new # metric = logging.metric "severe_errors" # metric.delete # def delete ensure_service!