mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(alerts): add MasterID to log records and improve traffic spike detection
- Add MasterID field with index to LogRecord model for efficient queries - Fix threshold config loading to use fixed ID=1 with FirstOrCreate - Allow traffic spike detection to work without Redis for log-based checks - Add traffic_spike to API documentation for alert type filter - Add comprehensive tests for RPM/RPD/TPM spike detection scenarios
This commit is contained in:
@@ -6,6 +6,7 @@ import "gorm.io/gorm"
|
||||
type LogRecord struct {
|
||||
gorm.Model
|
||||
Group string `json:"group"`
|
||||
MasterID uint `gorm:"index" json:"master_id"`
|
||||
KeyID uint `json:"key_id"`
|
||||
ModelName string `json:"model"`
|
||||
ProviderID uint `json:"provider_id"`
|
||||
|
||||
Reference in New Issue
Block a user