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.Buildersevere-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.Builderpublic Metric.Builder setDescription(String description)
MetricInfo.BuildersetDescription in class MetricInfo.Builderpublic Metric.Builder setFilter(String filter)
MetricInfo.BuilderlogName=projects/my-projectid/logs/syslog AND severity>=ERROR.setFilter in class MetricInfo.Builderpublic Metric build()
MetricInfo.BuilderMetricInfo object for this builder.build in class MetricInfo.BuilderCopyright © 2019 Google LLC. All rights reserved.