• Log inStart now

Arrays in NRQL

As part of New Relic's support for OpenTelemetry Protocol (OTLP) attributes can contain arrays. Arrays are a data structure that contains an ordered collection of values.

Currently only simple arrays are supported. You can query them with NRQL.

Simple arrays

Simple arrays are used to store a list of values of the same primitive type; for example, numeric, boolean, or string. An array looks like [1, 2, 3, 4, 5] or ["US", "CA", "UK"].

Supported features

  • Array attributes are supported in the FACET clause.
  • The functions getfield(), length(), and contains() can be run on arrays.
  • The uniques(), uniqueCount(), and latest() aggregator functions are also supported.
  • Arrays can contain up to 64 elements.

Unsupported features

  • Comparison operators such as =, !=, and IN are not supported with arrays.
  • Arrays cannot be aggregated with other aggregator functions such as sum(), min(), max(), etc.
  • Arrays cannot contain other arrays. For example, ["UK", "US", ["CA", "OR", "ATL"]] are not allowed.
  • Arrays cannot contain NULL.

Array functions

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.