Skip to content

MetricQueryBuilder🔗

Constructor🔗

new MetricQueryBuilder()

Methods🔗

build🔗

Builds the object.

build()

aliasBy🔗

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

aliasBy(string $aliasBy)

alignmentPeriod🔗

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

alignmentPeriod(string $alignmentPeriod)

crossSeriesReducer🔗

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

crossSeriesReducer(string $crossSeriesReducer)

editorMode🔗

editorMode(string $editorMode)

filters🔗

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

@param array $filters

filters(array $filters)

graphPeriod🔗

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

graphPeriod(string $graphPeriod)

groupBys🔗

Array of labels to group data by.

@param array $groupBys

groupBys(array $groupBys)

metricKind🔗

metricKind(\Grafana\Foundation\Googlecloudmonitoring\MetricKind $metricKind)

metricType🔗

metricType(string $metricType)

perSeriesAligner🔗

Alignment function to be used. Defaults to ALIGN_MEAN.

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

preprocessor(\Grafana\Foundation\Googlecloudmonitoring\PreprocessorType $preprocessor)

projectName🔗

GCP project to execute the query against.

projectName(string $projectName)

query🔗

MQL query to be executed.

query(string $query)

valueType🔗

valueType(string $valueType)

view🔗

view(string $view)

See also🔗