Area: Observability
Sub-Area: Data Contracts
Issue
Data contracts or assertions are failing but notifications or alerts are not being sent to configured channels (Slack, email, webhooks). This commonly occurs when DataHub Actions is not properly configured, notification channels are not set up, or alert routing is misconfigured.
You Might Be Asking:
- How do I set up alerts for assertion failures?
- Why aren't I receiving Slack notifications?
- How do I configure webhooks for data contract violations?
Solution
- Configure DataHub Actions for alerting:
# actions-config.yml
name: "datahub-actions"
source:
type: "kafka"
config:
connection:
bootstrap: "kafka:9092"
action:
type: "slack"
config:
webhook_url: "${SLACK_WEBHOOK_URL}"
# Assertion failure alerts
filters:
- type: "assertion_failure"
# Message template
message_template: |
🚨 *Assertion Failed*
Dataset: {{dataset.name}}
Assertion: {{assertion.type}}
Time: {{event.timestamp}}
- Create notification subscription in UI:
1. Navigate to Settings → Notifications
2. Click "Create Subscription"
3. Select trigger: "Assertion Result"
4. Configure filter: "Status = Failed"
5. Add Slack/Teams/Email channel
6. Save subscription
- Configure Slack webhook integration:
# In DataHub Actions config
action:
type: "slack"
config:
webhook_url: "https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
default_channel: "#data-alerts"
# Route different alerts to different channels
channel_mapping:
"CRITICAL": "#critical-alerts"
"WARNING": "#data-quality"
- Set up email notifications:
# In application.yml for GMS
notifications:
email:
enabled: true
smtp:
host: "smtp.gmail.com"
port: 587
username: "${SMTP_USERNAME}"
password: "${SMTP_PASSWORD}"
from: "datahub@company.com"
useSSL: true
- Configure webhook for custom integrations:
action:
type: "webhook"
config:
url: "https://your-service.com/webhook"
headers:
Authorization: "Bearer ${API_TOKEN}"
Content-Type: "application/json"
# Custom payload
payload_template: |
{
"event_type": "assertion_failure",
"dataset": "{{dataset.urn}}",
"assertion": "{{assertion.type}}",
"timestamp": "{{event.timestamp}}"
}
Additional Notes
DataHub Actions must be running for notifications to work. Test notification channels before relying on them for production alerts. Consider implementing escalation policies for critical data quality issues.
Related Documentation
Tags:
alerts, notifications, data-contracts, assertions, slack, email, webhooks, datahub-actions, observability