Skip to main content
Warrn uses intelligent polling that adapts based on tab visibility for optimal performance and battery life.

Overview

Warrn’s alert management system provides comprehensive incident tracking and resolution capabilities with AI-powered triage, real-time updates, and collaborative features for modern DevOps teams.

Core Features

Alert States & Lifecycle

Alerts in Warrn follow a structured lifecycle with clear state transitions:
type AlertStatus = "open" | "acknowledged" | "resolved";
type WarrnStatus = "pending" | "triage_in_progress" | "triage_success" | "triage_failed";
1

Alert Creation

Alerts can be created manually or automatically collected from external monitoring systems.
2

Acknowledgment

Team members can acknowledge alerts to indicate they’re being investigated.
3

AI Triage

Trigger intelligent triage for automated analysis and resolution recommendations.
4

Resolution

Mark alerts as resolved once the underlying issue is fixed.

AI-Powered Triage

Warrn includes an advanced AI triage system that automatically analyzes alerts and provides intelligent recommendations.
const handleAutoTriage = async (alertId: string) => {
  setActiveTriageId(alertId);
  
  // Start AI triage process
  await triageAlertMutation.mutateAsync(alertId);
  
  // Monitor progress with smart polling
  const pollInterval = setInterval(async () => {
    const updatedAlert = await refetchAlerts();
    if (updatedAlert?.warrn_status === 'triage_success') {
      // Triage completed successfully
      toast.success("Agentic Triage completed successfully!");
    }
  }, 5000);
};

Real-time Features

The alert system includes smart real-time capabilities:
  • Active Polling: 15-second intervals when tab is active
  • Background Polling: 1-minute intervals when tab is hidden
  • Exponential Backoff: Up to 5-minute maximum intervals
  • Page Visibility API: Automatic adjustment based on user focus
useSmartPolling({
  onPoll: async () => {
    await refetchAlerts();
    return true; // Indicates successful update
  },
  activeInterval: 15000,      // 15 seconds when active
  backgroundInterval: 60000,   // 1 minute when hidden
  maxBackgroundInterval: 300000, // 5 minute maximum
  enabled: !isLoading
});

Filter Options

Status Filters
  • All alerts
  • Not resolved (open + acknowledged)
  • Open only
  • Acknowledged only
  • Resolved only
Severity Filters
  • All severities
  • Critical
  • High
  • Medium
  • Low

Search Capabilities

The alert search supports multiple fields for comprehensive filtering:
const filteredAlerts = alerts.filter((alert) => {
  const matchesSearch = 
    alert.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
    alert.service_name.toLowerCase().includes(searchQuery.toLowerCase()) ||
    alert.team_name.toLowerCase().includes(searchQuery.toLowerCase());
  
  return matchesSearch && matchesStatus && matchesSeverity;
});

Alert Actions

Primary Actions

Acknowledge

Mark alert as acknowledged to indicate investigation has started.

Auto Triage

Trigger AI-powered analysis for intelligent resolution recommendations.

Resolve

Mark alert as resolved when the underlying issue is fixed.

Bulk Operations

Warrn supports efficient bulk operations for managing multiple alerts:
  • Bulk Acknowledge: Acknowledge multiple alerts simultaneously
  • Bulk Resolve: Resolve multiple alerts at once
  • Bulk Assignment: Assign multiple alerts to team members

Comment System

Each alert includes a collaborative comment system for team communication:

Alert Detail View

The alert detail view provides comprehensive information for incident investigation:

Information Sections

    Integration Patterns

    Multi-tenant Architecture

    All alert operations respect multi-tenant boundaries and ensure data isolation between organizations.
    // Example: Alert creation respects organization context
    const createAlert = async (alertData: CreateAlertData) => {
      // Organization ID is automatically injected based on user context
      const response = await api.post('/alerts', {
        ...alertData,
        organization_id: getCurrentOrganization().id
      });
      return response.data;
    };
    

    Optimistic Updates

    Warrn implements optimistic updates for improved user experience:
    const acknowledgeAlertMutation = useMutation({
      mutationFn: acknowledgeAlert,
      onMutate: async (alertId) => {
        // Optimistically update the UI immediately
        queryClient.setQueryData(['alerts'], (old) =>
          old?.map(alert => 
            alert.id === alertId 
              ? { ...alert, status: 'acknowledged' }
              : alert
          )
        );
      },
      onError: (error, alertId, context) => {
        // Revert optimistic update on error
        queryClient.invalidateQueries(['alerts']);
      }
    });
    

    Best Practices

    Performance Optimization

    1

    Smart Polling

    Use the built-in smart polling instead of aggressive real-time updates to conserve resources.
    2

    Pagination

    Implement pagination for large alert datasets to maintain performance.
    3

    Filtering

    Apply filters at the API level when possible to reduce data transfer.
    4

    Caching

    Leverage TanStack Query’s caching for entity mappings and static data.

    User Experience

    • Loading States: Always show appropriate loading indicators during operations
    • Error Handling: Provide clear error messages with actionable guidance
    • Keyboard Shortcuts: Implement shortcuts for power users (Ctrl+K for search)
    • Progressive Enhancement: Ensure core functionality works without JavaScript

    API Integration

    Key Endpoints

    # List alerts with filtering
    GET /api/alerts?status=open&severity=critical
    
    # Get alert details  
    GET /api/alerts/{id}
    
    # Update alert status
    PATCH /api/alerts/{id}
    {
      "status": "acknowledged"
    }
    
    # Trigger AI triage
    POST /api/alerts/{id}/triage
    
    # Add comment
    POST /api/alerts/{id}/comments
    {
      "content": "Investigation started",
      "type": "comment"
    }
    
    See the Alerts API documentation for complete endpoint details and examples.
    I