Back to Devoured - November 04, 2026
DEVOURED
Optimize your NRQL with Macros!

Optimize your NRQL with Macros!

DevOps New Relic
New Relic now supports NRQL Macros, allowing engineers to define reusable snippets to simplify complex queries and update dashboard metrics globally.
What: Users can create named macros, called by prefixing a name with '$', to encapsulate recurring clauses like WHERE filters or attribute aliases in New Relic Query Language.
Why it matters: This move brings 'DRY' (Don't Repeat Yourself) engineering principles to observability platforms, reducing the maintenance burden of large, fragmented monitoring dashboards.
Takeaway: Define your first macro under the 'Administration' section of your New Relic console to centralize your common query filters.
Decoder
  • NRQL: New Relic Query Language, a SQL-like language used to query telemetry data stored in New Relic.
  • DRY: Don't Repeat Yourself, a software development principle aimed at reducing repetition of information.
Original article

New Relic introduced NRQL Macros, which save an expression as a reusable named shortcut called by prefixing the name with a dollar sign. Macros can simplify long WHERE clauses and update many dashboard widgets by changing one definition.

Explore all 53 articles in today's digest

Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi