Skip to content

MetricQueryBuilder🔗

Constructor🔗

func NewMetricQueryBuilder() *MetricQueryBuilder

Methods🔗

Build🔗

Builds the object.

func (builder *MetricQueryBuilder) Build() (MetricQuery, error)

AliasBy🔗

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

func (builder *MetricQueryBuilder) AliasBy(aliasBy string) *MetricQueryBuilder

AlignmentPeriod🔗

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

func (builder *MetricQueryBuilder) AlignmentPeriod(alignmentPeriod string) *MetricQueryBuilder

CrossSeriesReducer🔗

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

func (builder *MetricQueryBuilder) CrossSeriesReducer(crossSeriesReducer string) *MetricQueryBuilder

EditorMode🔗

func (builder *MetricQueryBuilder) EditorMode(editorMode string) *MetricQueryBuilder

Filters🔗

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

func (builder *MetricQueryBuilder) Filters(filters []string) *MetricQueryBuilder

GraphPeriod🔗

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

func (builder *MetricQueryBuilder) GraphPeriod(graphPeriod string) *MetricQueryBuilder

GroupBys🔗

Array of labels to group data by.

func (builder *MetricQueryBuilder) GroupBys(groupBys []string) *MetricQueryBuilder

MetricKind🔗

func (builder *MetricQueryBuilder) MetricKind(metricKind googlecloudmonitoring.MetricKind) *MetricQueryBuilder

MetricType🔗

func (builder *MetricQueryBuilder) MetricType(metricType string) *MetricQueryBuilder

PerSeriesAligner🔗

Alignment function to be used. Defaults to ALIGN_MEAN.

func (builder *MetricQueryBuilder) PerSeriesAligner(perSeriesAligner string) *MetricQueryBuilder

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

func (builder *MetricQueryBuilder) Preprocessor(preprocessor googlecloudmonitoring.PreprocessorType) *MetricQueryBuilder

ProjectName🔗

GCP project to execute the query against.

func (builder *MetricQueryBuilder) ProjectName(projectName string) *MetricQueryBuilder

Query🔗

MQL query to be executed.

func (builder *MetricQueryBuilder) Query(query string) *MetricQueryBuilder

ValueType🔗

func (builder *MetricQueryBuilder) ValueType(valueType string) *MetricQueryBuilder

View🔗

func (builder *MetricQueryBuilder) View(view string) *MetricQueryBuilder

See also🔗