Skip to content

ExpressionBuilder🔗

Constructor🔗

new ExpressionBuilder()

Methods🔗

build🔗

Builds the object.

public Expression build()

datasourceUID🔗

The UID of the datasource to run this expression against. If omitted, the expression will be run against the __expr__ datasource

public ExpressionBuilder datasourceUID(String datasourceUID)

model🔗

public ExpressionBuilder model(Object model)

queryType🔗

The type of query if this is a query expression

public ExpressionBuilder queryType(String queryType)

relativeTimeRange🔗

public ExpressionBuilder relativeTimeRange(com.grafana.foundation.cog.Builder<RelativeTimeRange> relativeTimeRange)

source🔗

Used to mark the expression to be used as the final source for the rule evaluation

Only one expression in a rule can be marked as the source

For AlertRules, this is the expression that will be evaluated against the alerting condition

For RecordingRules, this is the expression that will be recorded

public ExpressionBuilder source(Boolean source)

See also🔗