Skip to main content
Log drains forward run log events from your jobs to external HTTP endpoints in near real-time. This allows you to integrate Strait’s execution logs with external observability platforms, SIEM tools, or custom log aggregation services.

LogDrain Model

The LogDrain struct (defined in apps/strait/internal/domain/types.go) contains the following fields:

Drain Types

The drain_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.
Choose a drain type that matches your destination’s ingestion API. Most observability platforms accept JSON over HTTP POST.

Authentication

The auth_type field determines how Strait authenticates with the external endpoint. The auth_config map holds the credentials for the chosen method.
The auth_config map contains sensitive credentials. Treat it with the same care as API keys or secrets.

Level Filtering

The level_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.
This is useful for high-volume environments where you only want critical events sent to an external destination.

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 the LOG_DRAIN_WORKER_INTERVAL environment variable. It defaults to 60s.
  • Runs: The execution instances whose log events are forwarded by log drains.
  • Jobs: The job definitions that produce the runs generating log events.