Expand description
§systemprompt-logging
Tracing and audit infrastructure for systemprompt.io. Owns the
structured-event pipeline, the database-backed tracing layer,
log/analytics repositories, and the CLI display
sinks. The trace-assembly queries over agent, AI and MCP tables live in
systemprompt_runtime::trace.
§Feature flags
| Feature | Description |
|---|---|
| (default) | Database layer, repositories |
cli | CLI display helpers (CliService, tables, banners) — pulls in console, indicatif |
§Top-level entry points
init_logging/init_console_logging/init_console_logging_with_level— install the globaltracingsubscriber (with optional database sink).shutdown_database_logging— flush the database sink’s buffered and queued entries and stop its writer task; awaited on server shutdown.LoggingExtension— schema/extension registration via theinventoryframework.LoggingRepository,AnalyticsRepository— direct repository access.
Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.
Re-exports§
pub use attribution::LogAttributionUnset;pub use attribution::install_log_attribution;pub use attribution::platform_attribution;pub use extension::LoggingExtension;pub use layer::DatabaseLayer;pub use layer::LogWriterHandle;pub use layer::LogWriterShutdownError;pub use layer::enqueue_background;pub use models::LogActor;pub use models::LogEntry;pub use models::LogFilter;pub use models::LogLevel;pub use repository::AnalyticsEvent;pub use repository::AnalyticsRepository;pub use repository::LoggingOwnerReassignment;pub use repository::LoggingRepository;pub use services::CliService;pub use services::BufferedNotice;pub use services::DatabaseLogService;pub use services::FilterSystemFields;pub use services::LogThrottle;pub use services::LoggingMaintenanceService;pub use services::SystemSpan;pub use services::buffer_notice;pub use services::drain_notices;pub use services::is_startup_mode;pub use services::is_structured_output;pub use services::mark_structured_emitted;pub use services::reset_structured_emitted;pub use services::set_startup_mode;pub use services::set_structured_output;pub use services::structured_was_emitted;
Modules§
- attribution
- Logging-side attribution cell.
- extension
Extensionregistration for the logging subsystem: schema, priority, required flag.- layer
tracingsubscriber layer that persists events to the database.- models
- Logging domain types: entries, levels, filters, and errors.
- repository
- Log persistence repository.
- sanitize
- Shared field-value sanitization for the console and database log sinks.
- services
- Logging services: the
tracingwrite path and span helpers.