feat: add protocol interaction observability

This commit is contained in:
hectorzhao
2026-07-24 10:47:47 +08:00
parent 4f4fa5fcb7
commit 0bfeb0839e
17 changed files with 740 additions and 42 deletions
+33
View File
@@ -182,6 +182,39 @@ model OperationLogArchive {
@@index([archiveMonth])
}
model ProtocolInteractionLog {
id String @id @default(cuid())
protocol String
direction String
eventType String
status String
tenantId String?
applicationId String?
channelId String?
account String?
messageId String?
gatewayMessageId String?
traceId String?
requestId String?
phoneMasked String?
resultCode String?
durationMs Int?
payloadBytes Int?
retryCount Int?
detail Json?
createdAt DateTime @default(now())
@@index([createdAt])
@@index([protocol, direction, createdAt])
@@index([eventType, createdAt])
@@index([status, createdAt])
@@index([channelId, createdAt])
@@index([applicationId, createdAt])
@@index([messageId])
@@index([gatewayMessageId])
@@index([requestId])
}
model FileObject {
id String @id @default(cuid())
tenantId String?