LogDrain Model
TheLogDrain struct (defined in apps/strait/internal/domain/types.go) contains the following fields:
Drain Types
Thedrain_type field specifies the format and protocol used when delivering log events to the endpoint. For example, an HTTP POST drain sends a JSON payload to the configured endpoint_url for each batch of log events.
Authentication
Theauth_type field determines how Strait authenticates with the external endpoint. The auth_config map holds the credentials for the chosen method.
Level Filtering
Thelevel_filter field accepts an array of log level strings. When set, only log events matching one of the specified levels are forwarded to the endpoint. When omitted or empty, all log levels are delivered.
CRUD Lifecycle
Log drains are managed through the following API operations:
Creating a log drain requires
project_id, name, drain_type, endpoint_url, and auth_type. Updates are partial — only the fields included in the PATCH body are modified.
All operations are scoped to a
project_id. List and single-resource endpoints require it as a query parameter.Configuration
The log drain delivery worker runs on a configurable interval controlled by theLOG_DRAIN_WORKER_INTERVAL environment variable. It defaults to 60s.