Package com.google.cloud.logging
Class MetricInfo
java.lang.Object
com.google.cloud.logging.MetricInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Metric
Cloud Logging metrics describe logs-based metric. The value of the metric is the number of log
entries that match a logs filter (see
getFilter()
).- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder forMetricInfo
objects. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns an optional description for this metric.Returns an advanced logs filter.getName()
Returns the name of the metric.int
hashCode()
static MetricInfo.Builder
newBuilder
(String name, String filter) Returns a builder forMetricInfo
objects given the name of the metric and its filter.static MetricInfo
Creates aMetricInfo
object given the name of the metric and its filter.Returns a builder for thisMetricInfo
object.toString()
-
Method Details
-
getName
Returns the name of the metric. 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. -
getDescription
Returns an optional description for this metric. Used for documentation purpose. -
getFilter
Returns an advanced logs filter. The value of the metric is the number of log entries that match this filter. Example:logName=projects/my-projectid/logs/syslog AND severity>=ERROR
.- See Also:
-
toString
-
equals
-
hashCode
public int hashCode() -
toBuilder
Returns a builder for thisMetricInfo
object. -
newBuilder
Returns a builder forMetricInfo
objects given the name of the metric and its filter. -
of
Creates aMetricInfo
object given the name of the metric and its filter.
-