orion-server 0.2.0

Declarative services runtime powered by dataflow-rs
# Orion Configuration
# All values shown are defaults. Uncomment and modify as needed.
# Environment variables override file values using ORION_SECTION__KEY format.
#
# Env-var substitution: values in this file may reference process
# environment variables with `${VAR}` (required, fails fast if unset)
# or `${VAR:-default}` (optional with a fallback). Use `$$` to escape
# a literal `$`. The same substitution also runs on connector
# `config_json` blobs at startup, so secrets can stay out of the
# database — e.g.:
#   [storage]
#   url = "${ORION_DB_URL:-sqlite:orion.db}"

[server]
# host = "0.0.0.0"
# port = 8080
# workers = <num_cpus>        # Defaults to number of CPU cores

# [server.compression]
# Response compression (gzip/br/zstd). Disabled by default — DEFLATE cost
# outweighs bandwidth savings on small JSON responses (a ~100 B body can grow
# slightly after gzip overhead). Enable when responses are typically large.
# enabled = false

[storage]
# url = "sqlite:orion.db"       # Database URL (sqlite:, postgres://, mysql://)
# max_connections = 10          # Connection pool max connections
# busy_timeout_ms = 5000        # SQLite busy timeout in milliseconds (ignored for other backends)
# acquire_timeout_secs = 5      # Connection pool acquire timeout in seconds

[ingest]
# max_payload_size = 1048576  # Maximum payload size in bytes (1 MB)

[engine]
# health_check_timeout_secs = 2   # Timeout for engine read lock in health checks
# reload_timeout_secs = 10        # Timeout for engine write lock during reload

[queue]
# workers = 4                  # Concurrent async job workers
# buffer_size = 1000           # Channel buffer for pending jobs
# shutdown_timeout_secs = 30   # Timeout for in-flight jobs during shutdown

[kafka]                         # Kafka producer + consumer (compiled into every binary)
# enabled = false
# brokers = ["localhost:9092"]
# group_id = "orion"

[rate_limit]
# enabled = false               # Enable request rate limiting
# default_rps = 100             # Default requests per second
# default_burst = 50            # Default burst allowance

# [rate_limit.endpoints]
# admin_rps = 50                # Rate limit for admin routes
# data_rps = 200                # Rate limit for data routes

# Per-channel rate limits are configured via the channel's config_json in the DB.
# Example: POST /api/v1/admin/channels with config.rate_limit.requests_per_second

[logging]
# level = "info"              # trace, debug, info, warn, error
# format = "pretty"           # pretty or json

[metrics]
# enabled = false

[tracing]                           # OpenTelemetry export (compiled into every binary; gated at runtime by `enabled`)
# enabled = false                   # Enable OpenTelemetry trace export
# otlp_endpoint = "http://localhost:4317"  # OTLP gRPC endpoint
# service_name = "orion"            # Service name in traces
# sample_rate = 1.0                 # 0.0 (none) to 1.0 (all)
#
# Per-request profile mode (developer-facing). When `true`, requests with
# `X-Orion-Profile: 1` (or `?profile=1`) get an `_orion.profile` object on
# the response with `version: 1`, a top-level `totals_ms`, an iterable
# `phases[]` array (engine_lock_wait, handlers, workflow_overhead,
# trace_store), and per-handler / per-connector breakdowns. The
# `_orion` namespace is reserved for debug surfaces. Defaults to
# `false` — leave off in production.
# debug_profile_enabled = false

[tracing.storage]
# Persistence policy for engine traces (rows in the `traces` table that admins
# inspect via /api/v1/data/traces). Unrelated to the OpenTelemetry export above.
#
#   sync   — write inline before responding (default; strongest durability,
#            throughput capped by single-writer SQLite under load)
#   async  — enqueue to a bounded background queue; one DB write per task
#   batch  — bounded queue; workers commit `batch_size` rows in one TX (highest
#            throughput on WAL-mode SQLite)
#   off    — skip persistence entirely; POST /{channel}/async returns
#            trace_id: null plus a `Warning` response header
# mode = "sync"
#
# Filters (compose with mode; applied per trace):
# sample_rate = 1.0                 # 0.0–1.0. Fraction of traces persisted
# errors_only = false               # Only persist traces that ended with errors
#
# Backpressure (async + batch modes):
# max_pending = 10000               # Bounded channel capacity
# async_on_overflow = "drop"        # `drop` or `block`
# overflow_block_timeout_ms = 100   # Used when `block` is selected
#
# Async-mode workers (one DB write per worker iteration):
# async_workers = 4
#
# Batch-mode workers:
# batch_size = 100
# batch_flush_interval_ms = 100
# batch_workers = 4
#
# Per-channel override is supported via the channel's `config.tracing` field:
#   { "tracing": { "mode": "off", "errors_only": true } }
# Unset per-channel fields fall back to the global default above.