Class: Google::Logging::V2::LogMetric
- Inherits:
-
Object
- Object
- Google::Logging::V2::LogMetric
- Defined in:
- lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb
Overview
Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter.
Defined Under Namespace
Modules: ApiVersion
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#filter ⇒ String
Required.
-
#name ⇒ String
Required.
-
#version ⇒ Google::Logging::V2::LogMetric::ApiVersion
Output only.
Instance Attribute Details
#description ⇒ String
Returns Optional. A description of this metric, which is used in documentation.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb', line 53 class LogMetric # Stackdriver Logging API version. module ApiVersion # Stackdriver Logging API v2. V2 = 0 # Stackdriver Logging API v1. V1 = 1 end end |
#filter ⇒ String
Returns Required. An logs filter[https://cloud.google.com/logging/docs/view/advanced_filters]. Example:
"resource.type=gae_app AND severity>=ERROR"
The maximum length of the filter is 20000 characters.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb', line 53 class LogMetric # Stackdriver Logging API version. module ApiVersion # Stackdriver Logging API v2. V2 = 0 # Stackdriver Logging API v1. V1 = 1 end end |
#name ⇒ String
Returns Required. The client-assigned metric identifier. Examples: +"error_count"+, +"nginx/requests"+.
Metric identifiers are limited to 100 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.
The metric identifier in this field must not be URL-encoded[https://en.wikipedia.org/wiki/Percent-encoding]. However, when the metric identifier appears as the +[METRIC_ID]+ part of a +metric_name+ API parameter, then the metric identifier must be URL-encoded. Example: +"projects/my-project/metrics/nginx%2Frequests"+.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb', line 53 class LogMetric # Stackdriver Logging API version. module ApiVersion # Stackdriver Logging API v2. V2 = 0 # Stackdriver Logging API v1. V1 = 1 end end |
#version ⇒ Google::Logging::V2::LogMetric::ApiVersion
Returns Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb', line 53 class LogMetric # Stackdriver Logging API version. module ApiVersion # Stackdriver Logging API v2. V2 = 0 # Stackdriver Logging API v1. V1 = 1 end end |