The design and organization of components that capture, store, and manage log data within a system form the logging architecture. A typical logging architecture includes several layers, each with a specific responsibility.

The following table summarizes the layers in the logging architecture and their functions:
Layer Responsibility
Logging middleware Captures per-request details such as start and stop times, method name, duration, status, and optional payloads.
Audit middleware Records security and policy-related events, including rate limits and authentication decisions from other modules.
Timing middleware Provides fine-grained latency measurements for operations. This feature is optional and can be enabled as needed.
Rate limiting wrapper Emits audit events indicating whether requests are allowed or denied based on rate-limiting policies.
Startup inventory Generates a list of tools, prompts, and scopes once during system startup.