mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add log webhook notification service
Implement webhook notifications for log error threshold alerts with configurable thresholds, time windows, and cooldown periods. - Add LogWebhookService with Redis-backed configuration storage - Add admin endpoints for webhook config management (GET/PUT) - Trigger webhook notifications when error count exceeds threshold - Support status code threshold and error message detection - Include sample log record data in webhook payload
This commit is contained in:
@@ -218,6 +218,8 @@ func main() {
|
||||
adminGroup.GET("/logs", handler.ListLogs)
|
||||
adminGroup.DELETE("/logs", handler.DeleteLogs)
|
||||
adminGroup.GET("/logs/stats", handler.LogStats)
|
||||
adminGroup.GET("/logs/webhook", handler.GetLogWebhookConfig)
|
||||
adminGroup.PUT("/logs/webhook", handler.UpdateLogWebhookConfig)
|
||||
adminGroup.GET("/stats", adminHandler.GetAdminStats)
|
||||
adminGroup.POST("/bindings", handler.CreateBinding)
|
||||
adminGroup.GET("/bindings", handler.ListBindings)
|
||||
|
||||
Reference in New Issue
Block a user