-
Notifications
You must be signed in to change notification settings - Fork 0
feat: runtime sink configuration via SettingsService (add/remove/reconfigure log sinks) #564
Copy link
Copy link
Closed
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:large3+ days of work3+ days of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:featureNew feature implementationNew feature implementationv0.5Minor version v0.5Minor version v0.5v0.5.2Patch release v0.5.2Patch release v0.5.2
Description
Note: the web dashboard has been rebuilt in React 19 + shadcn/ui as part of #762. Vue/PrimeVue references in this issue are outdated.
Summary
The observability module supports a comprehensive 7+1 sink layout (console + synthorg.log + audit.log + errors.log + agent_activity.log + cost_usage.log + debug.log + access.log) with per-sink levels, JSON/text formatting, rotation, and logger name routing. Currently, sink configuration is static -- baked into DEFAULT_SINKS at startup. The SettingsService observability namespace only has 2 settings (root_log_level, enable_correlation).
This issue expands the observability namespace to support full runtime sink CRUD via the REST API and settings UI.
Scope
- Add settings definitions for sink configuration in
settings/definitions/observability.py:- Per-sink enable/disable toggle
- Per-sink log level override
- Per-sink JSON format toggle
- Rotation config (max_bytes, backup_count, strategy)
- Custom sink creation (file path, level, logger name routing)
- Settings subscriber:
ObservabilitySettingsSubscriberthat reconfigures the logging pipeline when sink settings change (viaconfigure_logging()re-invocation -- it's already idempotent) - API exposure: Settings schema endpoints already support auto-discovery for dynamic UI generation -- ensure observability namespace sinks render correctly in the settings page
- Validation: Prevent removal of the console sink (always need at least one output). Validate file paths (no traversal, relative only). Validate logger name prefixes.
- Hot reload safety: Log pipeline reconfiguration must not drop messages. Use the existing
_clear_root_handlers+ re-attach pattern inconfigure_logging().
Dependencies
- Logging bootstrap wiring (activate the sink system first)
Acceptance Criteria
- Each default sink can be enabled/disabled at runtime via settings API
- Per-sink log level can be changed at runtime
- Changes take effect without restart (settings subscriber triggers reconfiguration)
- At least one sink must remain active (validation)
- Settings page auto-discovers and renders sink configuration
- Custom sinks can be added via settings (file path + level + routing)
- Tests cover hot reload, validation, and subscriber integration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:large3+ days of work3+ days of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:featureNew feature implementationNew feature implementationv0.5Minor version v0.5Minor version v0.5v0.5.2Patch release v0.5.2Patch release v0.5.2