Description
Feature Description
We can improve the experience for clients using accounts partitioning, if we add a new field account_ids
to nrql_query
block to accept an array of account ids instead of the single string you can pass today as account_id
.
This will be translated to a multi-account query, which is already supported on the nerdGraph API - widgets.rawConfiguration .nrqlQueries.[].accountIds
and also on the currentnewrelic_one_dashboard.variable
context see docs
Allow a nrql_queries
field in the newrelic_one_dashboard.widget_*
context. The new accept an array of nrql_query
objects, will include 2 fields with the following types:
Support nrql_query.account_ids
Field at the newrelic_one_dashboard.widget_*.
Context
Currently in a json / manual dashboard implementation, a panel allows nrqlQueries
Describe Alternatives
Currently the alternatives are:
- Use multiple
nrql_query
blocks in a widget block, each with its ownaccount_id
and the same query, as suggested here. This is a bad solution because instead of a combined result (for a multi-account query) you get multiple results (1 for each data account) you will see multliple graphs / billboard items etc. 🤮 - Use
newrelic_one_dashboard_raw
and provideconfiguration. nrqlQueries[].accountIds
to create the multi-account query. Unfortunately usingnewrelic_one_dashboard_raw
isn't the preferred practice and isn't kept up to date, and also lacks features like addingvariable
blocks - Use
newrelic_one_dashboard_json
and provideconfiguration. nrqlQueries[].accountIds
to create the multi-account query. This is possible but you have to sacrifice ease of using a human-maintainable, dynamicnewrelic_one_dashboard
.
Open questions
I started to work on a PR for this but realized the limit comes from the go-client pkg itself- is there a particular reason why nrqlQuery.AccountIDs
is not supported here?