docs(notification-outbox): add Notification category to Site Event Logging

This commit is contained in:
Joseph Doherty
2026-05-18 23:19:27 -04:00
parent 6ccf3766dc
commit a59f5ec1ff

View File

@@ -25,12 +25,13 @@ Site clusters (event recording and storage). Central cluster (remote query acces
| Data Connection Status | Connected, disconnected, reconnected (per connection) | | Data Connection Status | Connected, disconnected, reconnected (per connection) |
| Store-and-Forward | Message queued, delivered, retried, parked | | Store-and-Forward | Message queued, delivered, retried, parked |
| Instance Lifecycle | Instance enabled, disabled, deleted | | Instance Lifecycle | Instance enabled, disabled, deleted |
| Notification | Site→central forward failure, long-buffered notification (notification still in the site Store-and-Forward buffer past a threshold). Routine enqueue and successful forward events are **not** logged — central holds the authoritative `Notifications` table; site-side logging covers only the in-transit blind spot when the site cannot reach central. |
## Event Entry Schema ## Event Entry Schema
Each event entry contains: Each event entry contains:
- **Timestamp**: When the event occurred. - **Timestamp**: When the event occurred.
- **Event Type**: Category of the event (script, alarm, deployment, connection, store-and-forward, instance-lifecycle). - **Event Type**: Category of the event (script, alarm, deployment, connection, store-and-forward, instance-lifecycle, notification).
- **Severity**: Info, Warning, or Error. - **Severity**: Info, Warning, or Error.
- **Instance ID** *(optional)*: The instance associated with the event (if applicable). - **Instance ID** *(optional)*: The instance associated with the event (if applicable).
- **Source**: The subsystem that generated the event (e.g., "ScriptActor:MonitorSpeed", "AlarmActor:OverTemp", "DataConnection:PLC1"). - **Source**: The subsystem that generated the event (e.g., "ScriptActor:MonitorSpeed", "AlarmActor:OverTemp", "DataConnection:PLC1").
@@ -62,11 +63,12 @@ Each event entry contains:
- **Communication Layer**: Handles remote query requests from central. - **Communication Layer**: Handles remote query requests from central.
- **Site Runtime**: Generates script execution events, alarm events, deployment application events, and instance lifecycle events. - **Site Runtime**: Generates script execution events, alarm events, deployment application events, and instance lifecycle events.
- **Data Connection Layer**: Generates connection status events. - **Data Connection Layer**: Generates connection status events.
- **Store-and-Forward Engine**: Generates buffer activity events. - **Store-and-Forward Engine**: Generates buffer activity events, including notification-category forward failures and long-buffered notifications on the site→central notification path.
## Interactions ## Interactions
- **All site subsystems**: Event logging is a cross-cutting concern — any subsystem that produces notable events calls the Event Logging service. - **All site subsystems**: Event logging is a cross-cutting concern — any subsystem that produces notable events calls the Event Logging service.
- **Communication Layer**: Receives remote queries from central and returns results. - **Communication Layer**: Receives remote queries from central and returns results.
- **Central UI**: Site Event Log Viewer displays queried events. - **Central UI**: Site Event Log Viewer displays queried events.
- **Store-and-Forward Engine**: Its notification path (the site→central forward of script-generated notifications) reports forward failures and long-buffered notifications as Notification-category events. Routine enqueue/forward-success events are deliberately not logged — the central Notification Outbox's `Notifications` table is the authoritative audit record; site-side logging covers only the in-transit blind spot when central is unreachable.
- **Health Monitoring**: Script error rates and alarm evaluation error rates can be derived from event log data. - **Health Monitoring**: Script error rates and alarm evaluation error rates can be derived from event log data.