Reference to the isBlank() and isEmpty() string manipulation functions

Summary

isBlank(metric|source|<pointTagKey>, <tsExpression>)

isEmpty(metric|source|<pointTagKey>, <tsExpression>)

The isBlank() function returns true if the specified metadata string is a blank character (" "), and returns false otherwise.

The isEmpty() function returns true if the specified metadata string is the empty string, and returns false otherwise.

Parameters

ParameterDescription
metric|source|<pointTagKey> The metadata string (metric name, source name, or value of a point tag key) to be tested.
tsExpression The expression that describes the time series with the metadata string to be tested.

Example

The following examples illustrate how isBlank() works:

  • In this first screenshot, we check whether the value of the service point tag is the empty string. In this case, the result is false.

is blank false

  • In the second example, we’re using the taggify() function to replace the result of the query with the empty string, and then we call isBlank(). Now the result is true.

is blank true