Skip to main content

Module layer

Module layer 

Source
Expand description

tracing subscriber layer that persists events to the database.

DatabaseLayer buffers log events off the hot path and batch-inserts them from a background task, flushing on a size threshold, a timer, or immediately on an error. ProxyDatabaseLayer is the proxy-side variant.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Structs§

DatabaseLayer
ProxyDatabaseLayer

Functions§

enqueue_background
Non-blocking and off the caller’s hot path: the entry is dropped (and counted) if the sink is unattached or the channel is full. Error entries also request an immediate flush.