Observability & Debugging
NotiBoost cung cấp observability đầy đủ để debug và monitor notification flows.
Trace IDs
Mỗi message có một trace_id duy nhất để theo dõi toàn bộ lifecycle.
Ví dụ: trc_abc123 - sử dụng trace_id này để query logs và delivery status.
Audit Logs
Audit logs ghi lại mọi bước trong notification lifecycle.
Audit Events
- event.received - Event đã được nhận
- rule.matched - Rule đã match
- flow.triggered - Flow đã được trigger
- message.sent - Message đã được gửi
- message.delivered - Message đã được giao
- message.failed - Message gửi thất bại
Delivery Status
Theo dõi delivery status của mỗi message.
Status Types
- pending - Đang chờ xử lý
- sent - Đã gửi
- delivered - Đã giao thành công
- failed - Gửi thất bại
- retrying - Đang retry
Debugging
Cách debug notification issues.
Debug Workflow
- Lấy trace_id từ event response
- Query audit logs bằng trace_id
- Kiểm tra rule matching
- Xem flow execution steps
- Kiểm tra delivery status và error logs
Replay Events
Có thể replay events để test và debug.
Monitoring
Monitor notification system health.
Metrics
- Delivery success rate
- Average delivery time
- Error rate by channel
- Quota usage per channel
Alerts
Cảnh báo khi có vấn đề:
- High failure rate
- Quota gần hết
- System errors
