public static final class Metric.Builder extends MetricInfo.Builder
Metric
objects.Modifier and Type | Method and Description |
---|---|
Metric |
build()
Creates a
MetricInfo object for this builder. |
Metric.Builder |
setDescription(String description)
Sets an optional description for this metric.
|
Metric.Builder |
setFilter(String filter)
Sets an advanced logs filter.
|
Metric.Builder |
setName(String name)
Sets the name of the metric.
|
public Metric.Builder setName(String name)
MetricInfo.Builder
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.setName
in class MetricInfo.Builder
public Metric.Builder setDescription(String description)
MetricInfo.Builder
setDescription
in class MetricInfo.Builder
public Metric.Builder setFilter(String filter)
MetricInfo.Builder
logName=projects/my-projectid/logs/syslog AND severity>=ERROR
.setFilter
in class MetricInfo.Builder
public Metric build()
MetricInfo.Builder
MetricInfo
object for this builder.build
in class MetricInfo.Builder
Copyright © 2017 Google. All rights reserved.