public class MetricInfo extends Object implements Serializable
getFilter()
).Modifier and Type | Class and Description |
---|---|
static class |
MetricInfo.Builder
A builder for
MetricInfo objects. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDescription()
Returns an optional description for this metric.
|
String |
getFilter()
Returns an advanced logs filter.
|
String |
getName()
Returns the name of the metric.
|
int |
hashCode() |
static MetricInfo.Builder |
newBuilder(String name,
String filter)
Returns a builder for
MetricInfo objects given the name of the metric and its filter. |
static MetricInfo |
of(String name,
String filter)
Creates a
MetricInfo object given the name of the metric and its filter. |
MetricInfo.Builder |
toBuilder()
Returns a builder for this
MetricInfo object. |
String |
toString() |
public String getName()
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.public String getDescription()
public String getFilter()
logName=projects/my-projectid/logs/syslog AND
severity>=ERROR
.public MetricInfo.Builder toBuilder()
MetricInfo
object.public static MetricInfo.Builder newBuilder(String name, String filter)
MetricInfo
objects given the name of the metric and its filter.public static MetricInfo of(String name, String filter)
MetricInfo
object given the name of the metric and its filter.Copyright © 2023 Google LLC. All rights reserved.