Class: Google::Apis::LoggingV1beta3::LogMetric

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogMetric

Returns a new instance of LogMetric.


748
749
750
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 748

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

A description of this metric. Corresponds to the JSON property description

Returns:

  • (String)

740
741
742
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 740

def description
  @description
end

#filterString

An advanced logs filter. Example: "log: syslog AND metadata.severity>=ERROR". Corresponds to the JSON property filter

Returns:

  • (String)

746
747
748
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 746

def filter
  @filter
end

#nameString

The client-assigned name for this metric, such as "severe_errors". Metric names are limited to 1000 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/\. The slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. Corresponds to the JSON property name

Returns:

  • (String)

735
736
737
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 735

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


753
754
755
756
757
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 753

def update!(**args)
  @name = args[:name] unless args[:name].nil?
  @description = args[:description] unless args[:description].nil?
  @filter = args[:filter] unless args[:filter].nil?
end