Performance Alerts
Optima's intelligent alerting system helps you catch performance issues before they impact your users. Set up sophisticated alerts with customizable thresholds, multiple notification channels, and actionable insights.
🚨 Alert System Overview
The alert system continuously monitors your application's performance metrics and notifies you when thresholds are exceeded. It supports:
- Real-time Monitoring: Continuous evaluation of performance metrics
- Smart Thresholds: Static values or percentage-based comparisons
- Multiple Channels: Email and Slack notifications
- Professional Templates: Beautiful, actionable alert messages
- Team Collaboration: Multi-recipient notifications
📊 Supported Metrics
You can create alerts for any of these Core Web Vitals and performance metrics:
Core Web Vitals
- LCP (Largest Contentful Paint): Loading performance
- FID (First Input Delay): Interactivity measurement
- CLS (Cumulative Layout Shift): Visual stability
- INP (Interaction to Next Paint): Responsiveness
- TTFB (Time to First Byte): Server response time
- FCP (First Contentful Paint): Initial rendering
Custom Metrics
- Error Rate: JavaScript error frequency
- Loading Time: Custom page loading metrics
- Custom Events: Business-specific performance indicators
⚙️ Alert Configuration
Basic Alert Setup
// Example alert configuration
{
name: "LCP Performance Alert",
description: "Alert when LCP exceeds acceptable thresholds",
metric_name: "lcp",
aggregation_type: "p95",
evaluation_interval: "5m",
// Threshold configuration
critical_threshold: 4000, // 4 seconds
warning_threshold: 2500, // 2.5 seconds
resolved_threshold: 2000, // 2 seconds
// Notification settings
is_enabled: true
}Aggregation Types
Choose how your metric data is aggregated:
- P50 (Median): 50th percentile - typical user experience
- P75: 75th percentile - above-average user experience
- P95: 95th percentile - worst-case scenarios (recommended)
- P99: 99th percentile - extreme outliers
- AVG: Average value across all sessions
- MAX: Maximum value observed
- MIN: Minimum value observed
Evaluation Intervals
Control how often alerts are evaluated:
- 1m: Every minute (for critical metrics)
- 5m: Every 5 minutes (recommended for most alerts)
- 15m: Every 15 minutes (for less critical metrics)
- 30m: Every 30 minutes
- 1h: Every hour
- 24h: Daily evaluation
📧 Notification Channels
Email Notifications
Professional HTML emails with comprehensive performance insights:
// Email notification configuration
{
action_type: "email",
trigger_status: "critical",
settings: {
email_recipients: [
"dev-team@company.com",
"performance@company.com"
]
}
}Email Features:
- Professional Design: Mobile-responsive HTML templates
- Performance Context: Detailed metric information and thresholds
- Actionable Insights: Specific optimization recommendations
- Visual Indicators: Color-coded status and severity levels
- Direct Links: Quick access to detailed analysis in dashboard
Slack Integration
Real-time notifications in your team channels:
// Slack notification configuration
{
action_type: "slack",
trigger_status: "critical",
settings: {
webhook_url: "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
channel: "#performance-alerts",
message_template: "🚨 {{alert_name}} is {{status}}: {{metric_name}} = {{current_value}}ms (threshold: {{threshold}}ms)"
}
}Slack Features:
- Real-time Delivery: Instant notifications to team channels
- Custom Templates: Personalized message formats
- Rich Formatting: Structured messages with context
- Team Mentions: Alert specific team members or groups
🎯 Alert Status Levels
Critical Alerts
- Trigger: When metrics exceed critical thresholds
- Impact: Significant user experience degradation
- Response: Immediate attention required
- Notifications: All configured channels activated
Warning Alerts
- Trigger: When metrics exceed warning thresholds
- Impact: Noticeable performance degradation
- Response: Investigation recommended
- Notifications: Email notifications (configurable)
Resolved Alerts
- Trigger: When metrics return below resolved thresholds
- Impact: Performance has improved
- Response: Confirmation of fix effectiveness
- Notifications: Status update to all channels
🔧 Advanced Alert Configuration
Percentage-Based Thresholds
Set alerts based on percentage changes from baseline:
{
name: "LCP Regression Alert",
threshold_type: "percentage",
comparison_period: "7d",
critical_percentage: 25, // 25% worse than last week
warning_percentage: 15, // 15% worse than last week
resolved_percentage: 5 // Within 5% of baseline
}Multi-Condition Alerts
Create complex alerts with multiple conditions:
{
name: "Performance Degradation Alert",
conditions: [
{
metric: "lcp",
aggregation: "p95",
threshold: 3000
},
{
metric: "fid",
aggregation: "p95",
threshold: 100
}
],
logic: "AND" // Both conditions must be met
}Custom Evaluation Windows
Fine-tune how alerts evaluate your data:
{
name: "Custom Window Alert",
evaluation_interval: "5m",
evaluation_window: "15m", // Look at last 15 minutes of data
minimum_sessions: 10 // Require at least 10 sessions
}📈 Alert Management Dashboard
Alert Overview
- Alert Status: Current state of all alerts (Critical, Warning, Resolved)
- Recent Triggers: Latest alert activations with timestamps
- Performance Impact: How alerts correlate with user experience
- Team Activity: Who responded to alerts and when
Alert History
- Trigger Timeline: When alerts fired and resolved
- Duration Analysis: How long performance issues lasted
- Pattern Recognition: Recurring alert patterns
- Resolution Tracking: Time to resolution metrics
Alert Analytics
- False Positive Rate: Alerts that didn't require action
- Response Time: How quickly team responds to alerts
- Resolution Effectiveness: Whether fixes resolved issues
- Cost Analysis: Impact of performance issues on business metrics
🛠️ Implementation Examples
E-commerce Site Alert
// Critical for checkout performance
{
name: "Checkout Page LCP Alert",
metric_name: "lcp",
aggregation_type: "p95",
critical_threshold: 2500,
evaluation_interval: "1m",
// Filter to specific pages
filters: {
page_url: "/checkout",
device_type: "mobile"
},
actions: [
{
action_type: "email",
trigger_status: "critical",
settings: {
email_recipients: ["ecommerce-team@company.com"]
}
},
{
action_type: "slack",
trigger_status: "critical",
settings: {
webhook_url: "https://hooks.slack.com/...",
channel: "#ecommerce-alerts"
}
}
]
}SaaS Application Alert
// Monitor dashboard performance
{
name: "Dashboard Performance Alert",
metric_name: "inp",
aggregation_type: "p95",
critical_threshold: 200,
warning_threshold: 100,
evaluation_interval: "5m",
// Business hours only
schedule: {
timezone: "America/New_York",
active_hours: "09:00-17:00",
active_days: ["monday", "tuesday", "wednesday", "thursday", "friday"]
}
}Mobile-First Alert
// Focus on mobile performance
{
name: "Mobile LCP Alert",
metric_name: "lcp",
aggregation_type: "p95",
critical_threshold: 3000,
evaluation_interval: "5m",
// Mobile devices only
filters: {
device_type: "mobile",
connection_type: ["3g", "4g"]
},
// Custom message template
actions: [{
action_type: "slack",
trigger_status: "critical",
settings: {
message_template: "📱 Mobile performance issue: LCP {{current_value}}ms on {{device_type}} ({{connection_type}})"
}
}]
}🔍 Alert Troubleshooting
Common Issues
Alerts Not Triggering:
- Verify evaluation interval and thresholds
- Check minimum session requirements
- Ensure sufficient data volume
- Confirm alert is enabled
Too Many False Positives:
- Adjust threshold values
- Increase evaluation window
- Add minimum session requirements
- Use percentage-based thresholds
Missing Notifications:
- Verify email addresses and Slack webhooks
- Check spam folders for email alerts
- Confirm Slack channel permissions
- Test notification channels manually
Debug Mode
Enable detailed logging for alert troubleshooting:
// Add debug configuration
{
name: "Debug Alert",
debug: true, // Enable detailed logging
dry_run: true // Test without sending notifications
}📊 Best Practices
Threshold Selection
- Start Conservative: Begin with looser thresholds and tighten based on experience
- Use P95: Recommended for catching issues without too much noise
- Consider Context: Different pages may need different thresholds
- Monitor Trends: Adjust thresholds based on performance improvements
Alert Hygiene
- Regular Review: Audit alerts monthly for relevance
- Team Alignment: Ensure alerts match team priorities
- Documentation: Document what each alert monitors and why
- Response Plans: Define clear procedures for each alert type
Notification Management
- Right People: Send alerts to those who can act on them
- Appropriate Channels: Use Slack for immediate issues, email for summaries
- Escalation Paths: Define who to contact if primary responders are unavailable
- Quiet Hours: Consider team schedules and time zones
🚀 Advanced Features
Alert Correlation
- Multi-Metric Analysis: Correlate alerts across different metrics
- Business Impact: Connect performance alerts to business metrics
- Root Cause Analysis: Identify common causes of performance issues
- Predictive Alerting: Alert on trends before thresholds are breached
Integration Capabilities
- CI/CD Integration: Alert on deployment performance impact
- Monitoring Tools: Connect with existing monitoring infrastructure
- Incident Management: Integration with PagerDuty, Opsgenie, etc.
- Business Intelligence: Export alert data for analysis
Custom Dashboards
- Alert Widgets: Add alert status to custom dashboards
- Performance Correlation: Show alerts alongside performance data
- Team Dashboards: Create role-specific alert views
- Executive Reporting: High-level alert summaries for leadership
Getting Started with Alerts
- Create Your First Alert - Basic alert setup
- Configure Notifications - Email and Slack setup
- Monitor Alert Performance - Track alert effectiveness
- Optimize Thresholds - Fine-tune your alerts
Ready to set up alerts? Visit your Optima dashboard to get started.