Skip to content

MetricQueryBuilder🔗

Constructor🔗

new MetricQueryBuilder()

Methods🔗

build🔗

Builds the object.

public MetricQuery build()

aliasBy🔗

Aliases can be set to modify the legend labels. e.g. {{metric.label.xxx}}. See docs for more detail.

public MetricQueryBuilder aliasBy(String aliasBy)

alignmentPeriod🔗

Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.

public MetricQueryBuilder alignmentPeriod(String alignmentPeriod)

crossSeriesReducer🔗

Reducer applied across a set of time-series values. Defaults to REDUCE_NONE.

public MetricQueryBuilder crossSeriesReducer(String crossSeriesReducer)

editorMode🔗

public MetricQueryBuilder editorMode(String editorMode)

filters🔗

Array of filters to query data by. Labels that can be filtered on are defined by the metric.

public MetricQueryBuilder filters(List<String> filters)

graphPeriod🔗

To disable the graphPeriod, it should explictly be set to 'disabled'.

public MetricQueryBuilder graphPeriod(String graphPeriod)

groupBys🔗

Array of labels to group data by.

public MetricQueryBuilder groupBys(List<String> groupBys)

metricKind🔗

public MetricQueryBuilder metricKind(MetricKind metricKind)

metricType🔗

public MetricQueryBuilder metricType(String metricType)

perSeriesAligner🔗

Alignment function to be used. Defaults to ALIGN_MEAN.

public MetricQueryBuilder perSeriesAligner(String perSeriesAligner)

preprocessor🔗

Preprocessor is not part of the API, but is used to store the preprocessor and not affect the UI for the rest of parameters

public MetricQueryBuilder preprocessor(PreprocessorType preprocessor)

projectName🔗

GCP project to execute the query against.

public MetricQueryBuilder projectName(String projectName)

query🔗

MQL query to be executed.

public MetricQueryBuilder query(String query)

valueType🔗

public MetricQueryBuilder valueType(String valueType)

view🔗

public MetricQueryBuilder view(String view)

See also🔗