Skip to content

Commit 17c4e11

Browse files
authored
Merge pull request #539 from newrelic/debug-alerts
fix: add debugging output for alert conditions
2 parents 50264d2 + 3f5e207 commit 17c4e11

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/stages/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ const Stages = forwardRef(
173173
batchAlertConditionsByAccount,
174174
[]
175175
);
176+
debugString(JSON.stringify(batchedConditions), 'Batched conditions');
176177
const conditionsResponses = await Promise.allSettled(
177-
batchedConditions?.map(async ({ acctId, condIds }) => {
178+
batchedConditions?.map(async ({ acctId, condIds }, bIdx) => {
179+
debugString(JSON.stringify(condIds), `Alerts batch ${bIdx + 1}`);
178180
const query = conditionsDetailsQuery(acctId, condIds);
179181
const {
180182
data: { actor: { account: { alerts } = {} } = {} } = {},
@@ -207,7 +209,8 @@ const Stages = forwardRef(
207209
batchedIncidentIdsFromIssuesQuery(issuesBlocks);
208210

209211
const incidentsBlocks = await Promise.allSettled(
210-
batchedIncidentIds?.map(async ({ acctId, incidentIds }) => {
212+
batchedIncidentIds?.map(async ({ acctId, incidentIds }, iIdx) => {
213+
debugString(JSON.stringify(incidentIds), `Incidents ${iIdx + 1}`);
211214
const query = incidentsSearchQuery(acctId, incidentIds, timeWindow);
212215
const {
213216
data: {

0 commit comments

Comments
 (0)