-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nrql_alert_condition): Add support for data account ID #2706
feat(nrql_alert_condition): Add support for data account ID #2706
Conversation
Merge branch 'main' into feat/data_account_id_for_nrql_alert_condition
go.mod
Outdated
@@ -7,7 +7,7 @@ require ( | |||
github.com/mitchellh/go-homedir v1.1.0 | |||
github.com/newrelic/go-agent/v3 v3.30.0 | |||
github.com/newrelic/go-insights v1.0.3 | |||
github.com/newrelic/newrelic-client-go/v2 v2.37.0 | |||
github.com/newrelic/newrelic-client-go/v2 v2.39.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type: schema.TypeInt, | ||
Optional: true, | ||
Computed: true, | ||
Description: "BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis. - The New Relic account ID to use as the basis for the NRQL alert condition's `query`; will default to `account_id` if unspecified.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Calling out here that it's in "limited release"; after we GA the field, we'll update the Description
.
@@ -3,6 +3,7 @@ package newrelic | |||
import ( | |||
"context" | |||
"fmt" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷🏼♂️ gofmt
did this ... I just agreed to it.
@@ -101,6 +101,7 @@ The following arguments are supported: | |||
The `nrql` block supports the following arguments: | |||
|
|||
- `query` - (Required) The NRQL query to execute for the condition. | |||
- `data_account_id` - (Optional) **BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis.** The account ID to use for the alert condition's query as specified in the the `query` field. If `data_account_id` is not specified, then the condition's query will be evaluated against the `account_id`. Note that the `account_id` must have read privileges for the `data_account_id` or else the condition will be invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Calling out here that it's in "limited release"; after we GA the field, we'll update the Description
.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2706 +/- ##
==========================================
+ Coverage 32.82% 37.09% +4.27%
==========================================
Files 98 98
Lines 26884 21948 -4936
==========================================
- Hits 8824 8142 -682
+ Misses 17902 13645 -4257
- Partials 158 161 +3 ☔ View full report in Codecov by Sentry. |
performing some final checks before merge .... |
(performing final checks on |
Description
data_account_id
field on NRQL alert conditions which allows accounts to add NRQL alert conditions that look at a signal from data reporting to another account IDType of change
Checklist:
How to test this change?
nrql_alert_condition
with adata_account_id
-- thedata_account_id
may be the same account ID as the alert condition, or it may be an account ID that is in the same organization (the condition should create successfully)nrql_alert_condition
to have adata_account_id
-- given anrql_alert_condition
created without adata_account_id
, add one; given anrql_alert_condition
created with adata_account_id
, change it (the condition should update successfully)nrql_alert_condition
without adata_account_id
-- it's an optional field, so you should be able to create a condition "the old fashioned way" (i.e., without specifying one -- it'll just inherit the account ID that is otherwise used to create the condition)