* feat: add diagnostics console logs * test: avoid secret-like redaction fixtures * fix: address console logs review feedback * fix: harden console log capture lifecycle * fix: report console log drop summaries * fix: address diagnostics review cleanups
94 lines
3.4 KiB
Markdown
94 lines
3.4 KiB
Markdown
# Data Model: Diagnostics Console Logs
|
|
|
|
## ConsoleLogLine
|
|
|
|
Redacted raw stdout or stderr line exposed by Core.
|
|
|
|
- `Id`: unique event identifier.
|
|
- `Timestamp`: timestamp associated with the write when available.
|
|
- `ReceivedAt`: backend receive timestamp.
|
|
- `Sequence`: source-local monotonic sequence.
|
|
- `Stream`: `stdout` or `stderr`.
|
|
- `Text`: redacted line text after ANSI default handling.
|
|
- `Source`: `ConsoleLogSource` descriptor.
|
|
- `Truncated`: whether the line exceeded the configured maximum line length.
|
|
- `Dropped`: optional dropped-line metadata associated with the source or subscriber.
|
|
|
|
## ConsoleLogSource
|
|
|
|
Backend process, pod, container, machine, or provider source that produced console output.
|
|
|
|
- `Id`: stable source identifier.
|
|
- `DisplayName`: operator-facing name.
|
|
- `ServiceName`: service or application name.
|
|
- `ProcessId`: process identifier when available.
|
|
- `MachineName`: machine or host name.
|
|
- `PodName`, `ContainerName`, `Namespace`, `NodeName`: container/orchestrator metadata when available.
|
|
- `LastSeen`: most recent line or heartbeat timestamp.
|
|
- `Health`: `connected`, `stale`, or `disconnected`.
|
|
- `Metadata`: optional redacted provider metadata.
|
|
|
|
## ConsoleLogFilter
|
|
|
|
Criteria applied to recent queries and live subscriptions.
|
|
|
|
- `SourceId`: optional source filter.
|
|
- `Stream`: optional `stdout` or `stderr` filter.
|
|
- `Query`: optional free-text search over redacted line text and source fields.
|
|
- `From`, `To`: optional received-time range.
|
|
- `Limit`: requested recent count, clamped by server options.
|
|
|
|
## RecentConsoleLogsResult
|
|
|
|
Backfill response returned by the recent lines endpoint.
|
|
|
|
- `Items`: ordered `ConsoleLogLine` collection.
|
|
- `Dropped`: dropped-line summaries relevant to the result when known.
|
|
- `Sources`: optional source status snapshot if the endpoint chooses to include it.
|
|
|
|
## ConsoleLogDroppedSummary
|
|
|
|
Bounded-buffer or subscriber overflow summary.
|
|
|
|
- `SourceId`: affected source when known.
|
|
- `Stream`: affected stream when known.
|
|
- `Reason`: buffer overflow, subscriber overflow, provider unavailable, or other safe reason.
|
|
- `Count`: number of dropped lines.
|
|
- `From`, `To`: optional time span covered by the summary.
|
|
|
|
## ConsoleLogProvider
|
|
|
|
Replaceable provider facade for redacted console logs.
|
|
|
|
- Stores redacted recent lines in bounded history.
|
|
- Streams redacted live lines and dropped summaries.
|
|
- Lists redacted sources and source health.
|
|
- Does not receive or retain unredacted line text or sensitive source metadata.
|
|
|
|
## ConsoleCaptureTee
|
|
|
|
Capture boundary that observes stdout/stderr writes while preserving original destinations.
|
|
|
|
- Buffers partial writes until newline, maximum line length, or idle flush timeout.
|
|
- Emits one truncated event when a line exceeds maximum length.
|
|
- Avoids recursively capturing diagnostics generated by this feature unless explicitly enabled.
|
|
|
|
## ConsoleRedactionRule
|
|
|
|
Configured matching rule for sensitive line text or source metadata.
|
|
|
|
- `Name`: rule identifier.
|
|
- `Pattern`: configured match expression or equivalent matcher.
|
|
- `Replacement`: redaction marker.
|
|
- `AppliesTo`: line text, source metadata, or both.
|
|
|
|
## ConsoleLogSubscription
|
|
|
|
Live SignalR subscription state.
|
|
|
|
- `ConnectionId`: SignalR connection identifier.
|
|
- `Filter`: active `ConsoleLogFilter`.
|
|
- `QueueCapacity`: bounded subscriber queue capacity.
|
|
- `DroppedCount`: subscriber-local dropped-line count.
|
|
- `Cancellation`: cancellation state for unsubscribe/disconnect.
|