Observability
Observability and event logging classes and utilities.
deconvolute.observability
configure_observability
def configure_observability() -> NoneInitializes the global observability backend.
This sets up the local SQLite outbox for telemetry and starts the background synchronization worker if platform credentials are provided.
get_backend
def get_backend() -> BaseObservabilityBackendRetrieves the active observability backend, initializing it if necessary.
worker
TelemetrySyncWorker Objects
class TelemetrySyncWorker()Background worker for syncing audit events to the remote platform.
Runs in a dedicated daemon thread, waiting for signaling from the SQLiteStore. It reads pending events and processes them asynchronously without blocking the main application execution.
Attributes:
storeSQLiteStore - The local database instance.
__init__
def __init__(store: SQLiteStore) -> NoneInitializes the sync worker.
Arguments:
storeSQLiteStore - The local database instance containing the audit queue and event signal.
start
def start() -> NoneStarts the background worker thread if not already running.
stop
def stop() -> NoneSignals the worker thread to stop gracefully.
local
LocalObservabilityBackend Objects
class LocalObservabilityBackend(BaseObservabilityBackend)A unified local observability backend powered by SQLite.
All security telemetry, tool discoveries, and agent execution logs are
written to the audit_queue table. If an API key is present, the background
worker will securely transmit these events to the remote platform.
If not, they are retained locally with a cap to prevent disk bloat.
__init__
def __init__(*args: Any, **kwargs: Any) -> NoneInitializes the SQLite-backed local observability layer.
log_event
def log_event(event_type: str, payload: dict[str, Any]) -> NoneRecords a telemetry event to the database.
Arguments:
event_typestr - Categorizes the event (e.g. 'SESSION_DISCOVERY', 'SESSION_ACCESS').payloaddict[str, Any] - The full contextual payload to record.
close
def close() -> NoneCleans up resources. SQLite connections are handled via context managers in the store, so no explicit teardown is strictly required here.
backends
base
BaseObservabilityBackend Objects
class BaseObservabilityBackend(abc.ABC)Abstract base class for all Deconvolute observability backends.
A backend is responsible for durably recording security telemetry, tool discoveries, integrity violations, and agent execution events.
log_event
@abc.abstractmethod
def log_event(event_type: str, payload: dict[str, Any]) -> NoneRecords a telemetry event to the underlying storage mechanism.
Arguments:
event_typestr - A string categorizing the event (e.g. 'SESSION_DISCOVERY', 'SESSION_ACCESS').payloaddict[str, Any] - A dictionary containing the full context of the event. This must be JSON serializable.
close
@abc.abstractmethod
def close() -> NoneCleans up any open resources (like database connections, background threads, or file handles) used by the backend before the application exits.