JoobQ::ErrorMonitor
Inherits JSON::Serializable / Reference / Object
Error monitoring and alerting system
Constructors
new(pull : JSON::PullParser)
Sourcenew(time_window : Time::Span = 5.minutes, max_recent_errors : Int32 = 100, notify_alert : Proc(Hash(String, String), Nil) = ->(_alert_context : Hash(String, String)) do
end)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
alert_thresholds
Sourceclear_old_errors
Sourceclear_redis_errors
Sourceerror_counts
Sourceget_error_stats
Sourceget_errors_by_queue(queue_name : String) : Array(ErrorContext)
Sourceget_errors_by_type(error_type : String) : Array(ErrorContext)
Sourceget_errors_for_jobs_batch(jids : Array(String)) : Hash(String, ErrorContext | Nil)
Get error information for multiple jobs in batch
get_recent_errors(limit : Int32 = 20) : Array(ErrorContext)
Sourceget_recent_errors_paginated(page : Int32, per_page : Int32) : Array(ErrorContext)
Get recent errors with pagination support
get_time_windowed_error_stats
Sourceload_errors_from_redis
Sourcemax_recent_errors
Sourcemax_recent_errors=(max : Int32)
Sourcenotify_alert
Sourcenotify_alert=(callback : Proc(Hash(String, String), Nil))
Sourcerecent_errors
Sourcerecord_error(error_context : ErrorContext) : Nil
Sourcereset
Sourcestore_errors_batch(error_contexts : Array(ErrorContext)) : Nil
Batch error storage for improved performance
time_window
Sourcetime_window=(window : Time::Span)
Source