Class: Google::Apis::LoggingV1beta3::LogMetric
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV1beta3::LogMetric
- 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
-
#description ⇒ String
A description of this metric.
- #filter ⇒ String
-
#name ⇒ String
The client-assigned name for this metric, such as
"severe_errors"
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogMetric
constructor
A new instance of LogMetric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::Hashable
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
#description ⇒ String
A description of this metric.
Corresponds to the JSON property description
740 741 742 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 740 def description @description end |
#filter ⇒ String
An advanced logs filter. Example: "log:
syslog AND metadata.severity>=ERROR"
.
Corresponds to the JSON property filter
746 747 748 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 746 def filter @filter end |
#name ⇒ String
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
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 |