feat(log): 落地统一日志底座与系统日志运维能力
This commit is contained in:
@@ -10,6 +10,10 @@ type OpsRepository interface {
|
||||
ListErrorLogs(ctx context.Context, filter *OpsErrorLogFilter) (*OpsErrorLogList, error)
|
||||
GetErrorLogByID(ctx context.Context, id int64) (*OpsErrorLogDetail, error)
|
||||
ListRequestDetails(ctx context.Context, filter *OpsRequestDetailFilter) ([]*OpsRequestDetail, int64, error)
|
||||
BatchInsertSystemLogs(ctx context.Context, inputs []*OpsInsertSystemLogInput) (int64, error)
|
||||
ListSystemLogs(ctx context.Context, filter *OpsSystemLogFilter) (*OpsSystemLogList, error)
|
||||
DeleteSystemLogs(ctx context.Context, filter *OpsSystemLogCleanupFilter) (int64, error)
|
||||
InsertSystemLogCleanupAudit(ctx context.Context, input *OpsSystemLogCleanupAudit) error
|
||||
|
||||
InsertRetryAttempt(ctx context.Context, input *OpsInsertRetryAttemptInput) (int64, error)
|
||||
UpdateRetryAttempt(ctx context.Context, input *OpsUpdateRetryAttemptInput) error
|
||||
@@ -205,6 +209,69 @@ type OpsInsertSystemMetricsInput struct {
|
||||
ConcurrencyQueueDepth *int
|
||||
}
|
||||
|
||||
type OpsInsertSystemLogInput struct {
|
||||
CreatedAt time.Time
|
||||
Level string
|
||||
Component string
|
||||
Message string
|
||||
RequestID string
|
||||
ClientRequestID string
|
||||
UserID *int64
|
||||
AccountID *int64
|
||||
Platform string
|
||||
Model string
|
||||
ExtraJSON string
|
||||
}
|
||||
|
||||
type OpsSystemLogFilter struct {
|
||||
StartTime *time.Time
|
||||
EndTime *time.Time
|
||||
|
||||
Level string
|
||||
Component string
|
||||
|
||||
RequestID string
|
||||
ClientRequestID string
|
||||
UserID *int64
|
||||
AccountID *int64
|
||||
Platform string
|
||||
Model string
|
||||
Query string
|
||||
|
||||
Page int
|
||||
PageSize int
|
||||
}
|
||||
|
||||
type OpsSystemLogCleanupFilter struct {
|
||||
StartTime *time.Time
|
||||
EndTime *time.Time
|
||||
|
||||
Level string
|
||||
Component string
|
||||
|
||||
RequestID string
|
||||
ClientRequestID string
|
||||
UserID *int64
|
||||
AccountID *int64
|
||||
Platform string
|
||||
Model string
|
||||
Query string
|
||||
}
|
||||
|
||||
type OpsSystemLogList struct {
|
||||
Logs []*OpsSystemLog `json:"logs"`
|
||||
Total int `json:"total"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
}
|
||||
|
||||
type OpsSystemLogCleanupAudit struct {
|
||||
CreatedAt time.Time
|
||||
OperatorID int64
|
||||
Conditions string
|
||||
DeletedRows int64
|
||||
}
|
||||
|
||||
type OpsSystemMetricsSnapshot struct {
|
||||
ID int64 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
Reference in New Issue
Block a user