Skip to content

Add Slack/Discord alerting and integrate controls.alert() with DLQ replay#46

Merged
Prateek32177 merged 12 commits intomainfrom
codex/add-scalable-alerting-integration-for-slack-and-discord
Mar 3, 2026
Merged

Add Slack/Discord alerting and integrate controls.alert() with DLQ replay#46
Prateek32177 merged 12 commits intomainfrom
codex/add-scalable-alerting-integration-for-slack-and-discord

Conversation

@Prateek32177
Copy link
Contributor

Motivation

  • Introduce a simple alerting experience for Slack and Discord to notify on webhook events and DLQ occurrences.
  • Wire alerting into the Upstash controls API so callers can send alerts and optionally attempt DLQ replay in one call.
  • Provide DX-friendly defaults and payload builders so alerts require minimal configuration while allowing overrides.

Description

  • Added a new notifications module with types, utilities, constants, builders for Slack and Discord, and sendAlert to POST payloads to webhooks (src/notifications/*).
  • Exposed notification internals via src/alerts.ts and re-exported alerts from the main entry (src/index.ts) for backward compatibility (__alertInternals alias).
  • Implemented controls.alert() in src/upstash/controls.ts which accepts ControlAlertOptions, optionally runs replay(dlqId) when dlq: true, and calls sendAlert using TernControlsConfig.notifications.
  • Extended Upstash types to include notifications config, ControlAlertOptions, and the TernControls interface, and updated exports (src/upstash/types.ts, src/upstash/index.ts).
  • Updated README.md with usage examples and behavioral notes for controls.alert() and DLQ replay flow.

Testing

  • Ran the test suite with npm test and the tests completed successfully.
  • Ran platform tests with npm run test:all and they completed successfully.

Codex Task

@Prateek32177 Prateek32177 merged commit 082497c into main Mar 3, 2026
6 checks passed
@Prateek32177 Prateek32177 deleted the codex/add-scalable-alerting-integration-for-slack-and-discord branch March 3, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant