slack and env for buster prod alerts

This commit is contained in:
dal 2025-07-14 08:19:57 -06:00
parent c0745bc0c2
commit 3821c0211a
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 20 additions and 0 deletions

View File

@ -7,6 +7,8 @@ declare global {
ENVIRONMENT: string;
NODE_ENV?: 'development' | 'production' | 'test';
BUSTER_URL: string;
BUSTER_ALERT_CHANNEL_TOKEN?: string;
BUSTER_ALERT_CHANNEL_ID?: string;
}
}
}

View File

@ -211,6 +211,24 @@ export async function sendSlackNotification(
slackMessage
);
const busterChannelToken = process.env.BUSTER_ALERT_CHANNEL_TOKEN;
const busterChannelId = process.env.BUSTER_ALERT_CHANNEL_ID;
//Step 6: Send Alert To Buster Channel
if (busterChannelToken && busterChannelId) {
const busterResult = await sendSlackMessage(
busterChannelToken,
busterChannelId,
slackMessage
);
if (!busterResult.success) {
logger.warn('Failed to send alert to Buster channel', {
error: busterResult.error,
channelId: busterChannelId,
});
}
}
if (result.success) {
logger.log('Successfully sent Slack notification', {
organizationId: params.organizationId,