class Google::Apis::LoggingV2beta1::LogMetric

Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter.

Attributes

description[RW]

A description of this metric, which is used in documentation. Corresponds to the JSON property `description` @return [String]

filter[RW]

An [advanced logs filter](/logging/docs/view/advanced_filters). Example: `“ logName:syslog AND severity>=ERROR”`. Corresponds to the JSON property `filter` @return [String]

name[RW]

Required. The client-assigned metric identifier. Example: `“severe_errors”`. Metric identifiers are limited to 1000 characters and can include only the following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.,+!*' ,()%/`. The forward-slash character (`/`) denotes a hierarchy of name pieces, and it cannot be the first character of the name. Corresponds to the JSON property `name` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/logging_v2beta1/classes.rb, line 809
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/logging_v2beta1/classes.rb, line 814
def update!(**args)
  @name = args[:name] if args.key?(:name)
  @description = args[:description] if args.key?(:description)
  @filter = args[:filter] if args.key?(:filter)
end