Class MetricInfo (3.8.0)

public class MetricInfo implements Serializable

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: Logs-based Metrics

Inheritance

Object > MetricInfo

Implements

Serializable

Static Methods

newBuilder(String name, String filter)

public static MetricInfo.Builder newBuilder(String name, String filter)

Returns a builder for MetricInfo objects given the name of the metric and its filter.

Parameters
NameDescription
nameString
filterString
Returns
TypeDescription
MetricInfo.Builder

of(String name, String filter)

public static MetricInfo of(String name, String filter)

Creates a MetricInfo object given the name of the metric and its filter.

Parameters
NameDescription
nameString
filterString
Returns
TypeDescription
MetricInfo

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDescription()

public String getDescription()

Returns an optional description for this metric. Used for documentation purpose.

Returns
TypeDescription
String

getFilter()

public String 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: Advanced Log Filters

Returns
TypeDescription
String

getName()

public String 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 _-.,+!*',()%/</code>. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

toBuilder()

public MetricInfo.Builder toBuilder()

Returns a builder for this MetricInfo object.

Returns
TypeDescription
MetricInfo.Builder

toString()

public String toString()
Returns
TypeDescription
String
Overrides