Configuration reference
Configuration precedence is: typed defaults, discovered or explicit
praval.toml, environment variables, then explicit
configure_observability() arguments. Unknown fields and invalid bounds fail
with PravalConfigurationError; endpoints are never silently ignored.
praval.toml
[app]
service_name = "orders-agent"
service_version = "0.8.3"
deployment_environment = "production"
[observability]
enabled = true
capture_content = false
content_allowlist = []
sampling = "parentbased_traceidratio"
sample_ratio = 0.10
flush_timeout_millis = 5000
[observability.otlp]
endpoint = "http://otel-collector:4318"
protocol = "http/protobuf"
traces = true
metrics = true
logs = true
headers_env = "PRAVAL_OTLP_HEADERS"
max_queue_size = 2048
max_export_batch_size = 512
schedule_delay_millis = 5000
export_timeout_millis = 30000
metric_export_interval_millis = 60000
[observability.local]
enabled = false
path = ".praval/telemetry.db"
max_traces = 10000
max_age_days = 7
sampling accepts always_on, always_off, or
parentbased_traceidratio. Ratios are between 0 and 1. Queue sizes, batch
sizes, delays, timeouts, and retention counts are bounded and validated; a
batch cannot exceed its queue.
Fields and defaults
Field |
Type |
Default |
Validation/meaning |
|---|---|---|---|
|
bool |
|
no SDK pipeline when false |
|
bool |
|
also requires exact allowlist |
|
string array |
|
supported content-kind names only |
|
enum |
|
always on/off or parent ratio |
|
float |
|
0 through 1 |
|
int |
|
positive total bound |
|
string/null |
null |
required for enabled OTLP signals |
|
enum |
|
or |
|
bool |
|
signal selection |
|
bool |
|
signal selection |
|
bool |
|
signal selection |
|
string/null |
null |
bounded environment-variable name |
|
int |
|
positive |
|
int |
|
positive and no larger than queue |
|
int |
|
positive |
|
int |
|
positive |
|
int |
|
positive |
|
bool |
|
traces must be enabled |
|
string |
user diagnostic DB |
expanded at runtime |
|
int |
|
positive whole-trace retention |
|
int |
|
non-negative; zero disables age pruning |
Resource fields are app.service_name (default praval), optional
app.service_version, and optional app.deployment_environment. An enabled
pipeline requires a non-blank service name.
Environment variables
Variable |
Target |
Notes |
|---|---|---|
|
|
Praval takes precedence when both are set. |
|
|
Optional resource value. |
|
|
Resource value and legacy |
|
|
|
|
|
Float from 0 through 1. |
|
|
Boolean; still requires an allowlist. |
|
|
Does not enable SQLite by itself. |
|
|
Base URL or signal URL. |
|
|
|
|
signal enablement |
The supported value |
PRAVAL_CONFIG_FILE selects an explicit TOML file before discovery. If absent,
Praval searches the working directory and its parents for praval.toml; it
does not read a hidden home-directory default. PRAVAL_DEFAULT_PROVIDER and
PRAVAL_DEFAULT_MODEL configure the default model profile, not observability.
Only the standard OpenTelemetry variables listed above are part of Praval’s typed merge contract. Signal-specific endpoints, arbitrary sampler arguments, or vendor-specific variables may still affect host-owned SDKs, but Praval does not claim to parse or validate them.
headers_env names an environment variable whose value is a comma-separated
name=value list. Keep tokens out of TOML and source control. Missing or
malformed header variables fail configuration.
The older sample_rate, otlp_endpoint, and storage_path constructor fields
and PRAVAL_SAMPLE_RATE, PRAVAL_OTLP_ENDPOINT, and PRAVAL_TRACES_PATH
environment variables remain migration-compatible for v0.8.2 applications.