Webhooks & Alerts
Get notified about build regressions, failures, and performance issues in real-time
Overview
🔔 Stay Informed
Build Metrics can notify your team instantly when:
- ✓ Build time increases significantly (regression detected)
- ✓ Build size grows unexpectedly
- ✓ Build fails or errors occur
- ✓ Any custom threshold is exceeded
Slack Integration
Get notified in your team's Slack channel
Discord Integration
Send alerts to Discord webhooks
Custom Webhooks
Integrate with any tool via HTTP webhooks
Slack Integration
Step 1: Create Slack Webhook
- Go to your Slack workspace settings
- Navigate to Apps → Incoming Webhooks
- Click "Add to Slack"
- Choose the channel where you want notifications (e.g.,
#builds,#engineering) - Click "Add Incoming WebHooks integration"
- Copy the webhook URL (looks like
https://hooks.slack.com/services/...)
Step 2: Configure in Build Metrics
- Go to Build Metrics Dashboard
- Select your project
- Click "Settings" tab
- Scroll to "Webhooks & Alerts" section
- Click "Add Slack Webhook"
- Paste your Slack webhook URL
- Configure alert thresholds:
- Build time regression: Alert when build time increases by X% or Y seconds
- Build size growth: Alert when build size increases by X MB or Y%
- Build failures: Always notify on failed builds
- Click "Save"
✅ Example Slack Message
⚠️ Build Regression Detected
Project: MyGame
Platform: Android
Build Time: 245s (+45s, +22%)
Build Size: 52 MB (+2 MB)
Commit: a1b2c3d - "Added new assets"
View details: https://app.buildmetrics.moonlightember.com/builds/123
Discord Integration
Step 1: Create Discord Webhook
- Open your Discord server
- Go to Server Settings → Integrations → Webhooks
- Click "New Webhook"
- Choose the channel for notifications (e.g.,
#builds) - Customize name and avatar (optional)
- Click "Copy Webhook URL"
Step 2: Add to Build Metrics
- Go to Build Metrics Dashboard → Projects → Settings
- Scroll to "Webhooks & Alerts"
- Click "Add Discord Webhook"
- Paste your Discord webhook URL
- Configure alert rules (same as Slack)
- Click "Save"
Custom Webhooks
Integrate with any tool that accepts HTTP POST requests (PagerDuty, Datadog, custom dashboards, etc.)
Setup
- Go to Build Metrics Dashboard → Projects → Settings
- Click "Add Custom Webhook"
- Enter your webhook URL
- Configure authentication (optional):
- Bearer token
- Custom headers
- Basic auth
- Configure alert rules
- Click "Save"
Webhook Payload
Build Metrics sends a JSON POST request to your webhook URL:
{
"event": "build_regression",
"project": {
"id": "proj_abc123",
"name": "MyGame"
},
"build": {
"id": "build_xyz789",
"platform": "Android",
"buildTimeSeconds": 245,
"previousBuildTimeSeconds": 200,
"buildTimeDelta": 45,
"buildTimePercentChange": 22.5,
"outputSizeBytes": 54525952,
"previousOutputSizeBytes": 52428800,
"outputSizeDelta": 2097152,
"unityVersion": "2022.3.10f1",
"timestamp": "2026-01-31T12:00:00Z",
"gitCommitSha": "a1b2c3d",
"gitCommitMessage": "Added new assets",
"gitBranch": "main"
},
"alert": {
"type": "build_time_regression",
"threshold": {
"percentIncrease": 20,
"secondsIncrease": 30
},
"message": "Build time increased by 45s (+22.5%)"
},
"url": "https://app.buildmetrics.moonlightember.com/builds/build_xyz789"
}Event Types
| Event | When It Triggers |
|---|---|
build_regression | Build time or size exceeds threshold |
build_failure | Build fails or errors occur |
build_success | Build completes successfully (optional) |
Alert Configuration
Alert Rules
| Rule Type | Example Configuration |
|---|---|
| Build Time Increase | Alert if time increases by >20% OR >30 seconds |
| Build Size Increase | Alert if size increases by >10 MB OR >15% |
| Build Failures | Always alert (enabled by default) |
| Per-Platform Rules | Different thresholds for Android vs iOS vs WebGL |
💡 Best Practices
- Start with conservative thresholds (30% increase) and tighten as needed
- Use OR conditions: alert if either percentage OR absolute value exceeded
- Set different thresholds per platform (WebGL builds are typically slower)
- Create separate channels for different alert severities
Troubleshooting
Webhooks Not Triggering
- Verify webhook URL is correct and accessible
- Check alert thresholds aren't too high
- Ensure webhooks are enabled for the project
- Test webhook with "Send Test" button in dashboard
- Review webhook logs in Build Metrics dashboard
Too Many Alerts
- Increase alert thresholds to reduce noise
- Add cooldown period (e.g., max 1 alert per hour)
- Filter alerts by branch (only alert on
main) - Disable "build success" notifications if too frequent
Slack/Discord Not Receiving
- Verify webhook URL hasn't expired or been revoked
- Check channel permissions in Slack/Discord
- Ensure webhook is configured for correct channel
- Test with curl command to verify webhook works
Next Steps
← CI/CD Integration
Set up automated builds with GitHub Actions or GitLab CI
Configure Webhooks →
Set up your first webhook in the dashboard
📚 Need Help?
Have questions about webhooks or alert configuration?