Environment Variables
Variable |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
False |
Enable adaptive batch sizing based on sink latency feedback |
|
float |
0.25 |
Seconds between queue pressure samples |
|
float |
0.2 |
Effective fill ratio boost per open sink circuit breaker |
|
float |
2.0 |
Minimum seconds between pressure level transitions |
|
float |
0.75 |
Fill ratio below which CRITICAL de-escalates to HIGH |
|
float |
0.4 |
Fill ratio below which ELEVATED de-escalates to NORMAL |
|
float |
0.6 |
Fill ratio below which HIGH de-escalates to ELEVATED |
|
bool |
False |
Enable adaptive pressure monitoring task |
|
float |
0.92 |
Fill ratio to escalate HIGH to CRITICAL |
|
float |
0.6 |
Fill ratio to escalate NORMAL to ELEVATED |
|
float |
0.8 |
Fill ratio to escalate ELEVATED to HIGH |
|
bool |
True |
Enable adaptive filter tightening based on pressure level |
|
int |
8 |
Maximum number of workers when dynamic scaling is active |
|
float |
0.3 |
Protected queue fill ratio that deactivates shedding |
|
float |
0.7 |
Protected queue fill ratio that activates shedding |
|
bool |
True |
Enable dynamic worker scaling based on pressure level |
|
str |
fapilog |
Logical application name |
|
bool |
True |
Register atexit handler to drain pending logs on normal process exit |
|
float |
2.0 |
Maximum seconds to wait for log drain during atexit handler |
|
int |
50 |
Milliseconds to wait for queue space before dropping |
|
int |
256 |
Maximum number of events per batch before a flush is triggered |
|
float |
0.25 |
Maximum time to wait before flushing a partial batch |
|
str |
None |
— |
|
bool |
False |
Automatically install unhandled exception hooks (sys/asyncio) |
|
bool |
True |
Enable per-task bound context via logger.bind/unbind/clear |
|
dict |
PydanticUndefined |
Default bound context applied at logger creation when enabled |
|
Literal |
stderr |
Output stream for internal diagnostics: stderr (default, Unix convention) or stdout (backward compat) |
|
bool |
True |
If True, drop events after backpressure_wait_ms elapses when queue is full |
|
float |
60.0 |
Window in seconds for aggregating drop/dedupe summary events. Summaries are emitted at most once per window. |
|
bool |
False |
Emit summary log events when events are dropped due to backpressure or deduplicated due to error dedupe window |
|
bool |
False |
Enable Prometheus-compatible metrics |
|
bool |
True |
Enable redactors stage between enrichers and sink emission |
|
list |
PydanticUndefined |
Enricher plugins to use (by name) |
|
int |
1000 |
Maximum number of entries in the error deduplication dict; oldest entries are evicted when the cap is reached |
|
float |
10.0 |
Multiplier applied to error_dedupe_window_seconds to determine TTL for periodic sweep of stale dedupe entries |
|
float |
5.0 |
Seconds to suppress duplicate ERROR logs with the same message; 0 disables deduplication |
|
bool |
True |
Enable structured exception serialization for log calls |
|
int |
10 |
Maximum number of stack frames to capture for exceptions |
|
int |
20000 |
Maximum total characters for serialized stack string |
|
int |
None |
— |
|
Literal |
minimal |
Redaction mode for fallback stderr output: ‘inherit’ uses pipeline redactors, ‘minimal’ applies built-in sensitive field masking, ‘none’ writes unredacted (opt-in to legacy behavior) |
|
bool |
True |
Apply keyword scrubbing to raw (non-JSON) fallback output; set to False for debugging when raw output is needed |
|
list |
PydanticUndefined |
Filter plugins to apply before enrichment (by name) |
|
bool |
False |
Immediately flush ERROR and CRITICAL logs (bypass batching) to reduce log loss on abrupt shutdown |
|
bool |
False |
Emit DEBUG/WARN diagnostics for internal errors |
|
Literal |
INFO |
Default log level |
|
int |
10000 |
Maximum in-memory queue size for async processing |
|
list |
PydanticUndefined |
Processor plugins to use (by name) |
|
list |
PydanticUndefined |
Log levels protected from queue-pressure dropping. When queue is full and a protected-level event arrives, an unprotected event is evicted. Set to [] to disable priority dropping (all events treated equally). |
|
int |
None |
— |
|
Literal |
warn |
Behavior when _apply_redactors() catches an unexpected exception: ‘open’ passes original event, ‘closed’ drops the event, ‘warn’ (default) passes event but emits diagnostic warning |
|
int |
None |
6 |
|
int |
None |
5000 |
|
list |
PydanticUndefined |
Redactor plugins to use (by name); defaults to [‘url_credentials’] for secure defaults; set to [] to disable all redaction |
|
list |
PydanticUndefined |
Ordered list of redactor plugin names to apply |
|
float |
2.0 |
Default acquire timeout for pools |
|
int |
8 |
Default max size for resource pools |
|
list |
PydanticUndefined |
Optional list of dotted paths for sensitive fields policy; warning if no redactors configured |
|
bool |
False |
If True, pre-serialize envelopes once during flush and pass SerializedView to sinks that support write_serialized |
|
float |
3.0 |
Maximum time to flush on shutdown signals |
|
bool |
True |
Install signal handlers for SIGTERM/SIGINT to enable graceful drain |
|
list |
PydanticUndefined |
Sink plugins to use (by name); falls back to env-based default when empty |
|
bool |
False |
Enable circuit breaker for sink fault isolation |
|
int |
5 |
Number of consecutive failures before opening circuit |
|
str |
None |
— |
|
float |
30.0 |
Seconds to wait before probing a failed sink |
|
int |
1 |
Max concurrent sink writes per worker per batch flush. Unlike sink_parallel_writes (fan-out across multiple sinks), this controls concurrency for multiple events to the same sink. |
|
bool |
False |
Write to multiple sinks in parallel instead of sequentially |
|
bool |
False |
If True, drop emission when envelope cannot be produced; otherwise fallback to best-effort serialization with diagnostics |
|
int |
1 |
Number of worker tasks for flush processing |
|
dict |
PydanticUndefined |
Configuration for context_vars enricher |
|
dict |
PydanticUndefined |
Configuration for third-party enrichers by name |
|
Literal |
sha256 |
MAC or signature algorithm |
|
str |
None |
— |
|
str |
None |
— |
|
str |
None |
env |
|
bool |
False |
Reset chain after rotation |
|
bool |
False |
Sign integrity hashes via KMS provider |
|
dict |
PydanticUndefined |
Configuration for runtime_info enricher |
|
dict |
PydanticUndefined |
Configuration for adaptive_sampling filter |
|
dict |
PydanticUndefined |
Configuration for third-party filters by name |
|
dict |
PydanticUndefined |
Configuration for first_occurrence filter |
|
dict |
PydanticUndefined |
Configuration for level filter |
|
dict |
PydanticUndefined |
Configuration for rate_limit filter |
|
dict |
PydanticUndefined |
Configuration for sampling filter |
|
dict |
PydanticUndefined |
Configuration for trace_sampling filter |
|
str |
array |
Batch format: ‘array’, ‘ndjson’, or ‘wrapped’ |
|
int |
1 |
Maximum events per HTTP request (1 = no batching) |
|
float |
5.0 |
Max seconds before flushing a partial batch. Accepts ‘5s’ or 5.0 |
|
str |
logs |
Wrapper key when batch_format=‘wrapped’ |
|
str |
None |
— |
|
dict |
PydanticUndefined |
Default headers to send with each request |
|
str |
None |
— |
|
float |
None |
— |
|
int |
None |
— |
|
float |
5.0 |
Request timeout for HTTP sink operations. Accepts ‘5s’ or 5.0 |
|
bool |
False |
Enable emitting alerts from the logging pipeline |
|
Literal |
ERROR |
Minimum alert severity to emit (filter threshold) |
|
Literal |
json |
Output format for logs (machine-friendly JSON or text) |
|
bool |
True |
Include correlation IDs and trace/span metadata in logs |
|
float |
1.0 |
DEPRECATED: Use core.filters=[‘sampling’] with filter_config.sampling instead. Log sampling probability in range 0.0–1.0. |
|
bool |
False |
Enable internal metrics collection/export |
|
Literal |
prometheus |
Metrics exporter to use (‘prometheus’ or ‘none’) |
|
int |
8000 |
TCP port for metrics exporter |
|
bool |
False |
Enable health/monitoring checks and endpoints |
|
str |
None |
— |
|
bool |
False |
Enable distributed tracing features |
|
Literal |
otel |
Tracing backend provider (‘otel’ or ‘none’) |
|
float |
0.1 |
Trace sampling probability in range 0.0–1.0 |
|
list |
PydanticUndefined |
If non-empty, only these plugin names are allowed |
|
bool |
False |
Allow loading plugins from entry points (security risk) |
|
list |
PydanticUndefined |
Plugin names to block from loading |
|
bool |
True |
Enable plugin loading |
|
str |
disabled |
Plugin validation mode: disabled, warn, or strict |
|
dict |
PydanticUndefined |
Configuration for third-party processors by name |
|
Literal |
truncate |
Action to take when payload exceeds max_bytes |
|
int |
256000 |
Maximum payload size in bytes (min 100). Accepts ‘1 MB’ or 1048576 |
|
list |
PydanticUndefined |
Fields that should never be removed during truncation |
|
dict |
PydanticUndefined |
Configuration for zero_copy processor (reserved for future options) |
|
dict |
PydanticUndefined |
Configuration for third-party redactors by name |
|
list |
PydanticUndefined |
Field names exempt from blocking even if in blocklist |
|
list |
PydanticUndefined |
Field names to block (replaces values with marker) |
|
int |
16 |
Max nested depth to scan |
|
int |
1000 |
Max keys to scan before stopping |
|
str |
[REDACTED:HIGH_RISK_FIELD] |
Replacement string for blocked field values |
|
bool |
True |
Emit diagnostic warning when a field path cannot be redacted |
|
list |
PydanticUndefined |
Field names to mask (case-insensitive) |
|
str |
*** |
Replacement mask string |
|
int |
16 |
Max nested depth to scan |
|
int |
1000 |
Max keys to scan before stopping |
|
bool |
False |
Block log entry if redaction fails |
|
str |
*** |
Replacement mask string |
|
int |
16 |
Max nested depth to scan |
|
int |
1000 |
Max keys to scan before stopping |
|
list |
PydanticUndefined |
Regex patterns to match and mask |
|
int |
16 |
Max nested depth to scan |
|
int |
1000 |
Max keys to scan before stopping |
|
int |
None |
— |
|
int |
4096 |
Max string length to parse for URL credentials |
|
str |
1.0 |
Configuration schema version for forward/backward compatibility |
|
list |
PydanticUndefined |
List of roles granted access to protected operations |
|
bool |
False |
Permit read access without authentication (discouraged) |
|
bool |
False |
Permit write access without authentication (never recommended) |
|
Literal |
token |
Authentication mode used by integrations (library-agnostic) |
|
bool |
True |
Enable access control checks across the system |
|
bool |
True |
Require admin role for sensitive or destructive operations |
|
Literal |
AES-256 |
Primary encryption algorithm |
|
bool |
True |
Enable encryption features |
|
str |
None |
— |
|
str |
None |
— |
|
str |
None |
— |
|
Optional |
— |
Source for key material |
|
Literal |
1.2 |
Minimum TLS version for transport |
|
int |
90 |
Recommended key rotation interval |
|
int |
100 |
Events per batch |
|
float |
5.0 |
Max seconds before flushing a partial batch. Accepts ‘5s’ or 5.0 |
|
bool |
True |
Enable internal circuit breaker for CloudWatch sink |
|
int |
5 |
Failures before opening circuit |
|
bool |
True |
Create log group if missing |
|
bool |
True |
Create log stream if missing |
|
str |
None |
— |
|
str |
/fapilog/default |
CloudWatch log group name |
|
str |
None |
— |
|
int |
3 |
Max retries for PutLogEvents |
|
str |
None |
— |
|
float |
0.5 |
Base delay for exponential backoff. Accepts ‘1s’ or 0.5 |
|
dict |
PydanticUndefined |
Configuration for third-party sinks by name |
|
str |
array |
Batch format: ‘array’, ‘ndjson’, or ‘wrapped’ |
|
int |
1 |
Maximum events per HTTP request (1 = no batching) |
|
float |
5.0 |
Max seconds before flushing a partial batch. Accepts ‘5s’ or 5.0 |
|
str |
logs |
Wrapper key when batch_format=‘wrapped’ |
|
str |
None |
— |
|
dict |
PydanticUndefined |
Default headers to send with each request |
|
str |
None |
— |
|
float |
None |
— |
|
int |
None |
— |
|
float |
5.0 |
Request timeout for HTTP sink operations. Accepts ‘5s’ or 5.0 |
|
str |
None |
— |
|
str |
None |
— |
|
str |
None |
— |
|
int |
100 |
Events per batch |
|
float |
5.0 |
Max seconds before flushing a partial batch. Accepts ‘5s’ or 5.0 |
|
bool |
True |
Enable circuit breaker for the Loki sink |
|
int |
5 |
Failures before opening circuit |
|
dict |
PydanticUndefined |
Static labels to apply to each log stream |
|
list |
PydanticUndefined |
Event keys to promote to labels |
|
int |
3 |
Max retries on push failure |
|
float |
0.5 |
Base delay for backoff. Accepts ‘1s’ or 0.5 |
|
str |
None |
— |
|
float |
10.0 |
HTTP timeout seconds. Accepts ‘10s’ or 10.0 |
|
str |
http://localhost:3100 |
Loki push endpoint base URL |
|
int |
100 |
Events per batch |
|
float |
5.0 |
Max seconds before flushing a partial batch. Accepts ‘5s’ or 5.0 |
|
bool |
True |
Enable circuit breaker for the PostgreSQL sink |
|
int |
5 |
Failures before opening circuit breaker |
|
bool |
True |
Auto-create table if missing |
|
str |
fapilog |
PostgreSQL database name to connect to |
|
str |
None |
— |
|
list |
PydanticUndefined |
Fields to promote to columns for fast queries |
|
str |
localhost |
PostgreSQL server hostname or IP address |
|
bool |
True |
Store full event JSON payload |
|
int |
10 |
Maximum pool connections |
|
int |
3 |
Maximum retries for failed inserts |
|
int |
2 |
Minimum pool connections |
|
str |
None |
— |
|
float |
10.0 |
Timeout when acquiring connections. Accepts ‘10s’ or 10.0 |
|
int |
5432 |
PostgreSQL server port number |
|
float |
0.5 |
Base delay for exponential backoff. Accepts ‘1s’ or 0.5 |
|
str |
public |
Database schema name |
|
str |
logs |
Target table name |
|
str |
fapilog |
PostgreSQL username for authentication |
|
bool |
True |
Use JSONB column type |
|
bool |
False |
Compress rotated log files with gzip |
|
str |
None |
— |
|
str |
fapilog |
Filename prefix |
|
float |
None |
— |
|
int |
10485760 |
Max bytes before rotation. Accepts ‘10 MB’ or 10485760 |
|
int |
None |
— |
|
int |
None |
— |
|
Literal |
json |
Output format: json or text |
|
str |
None |
— |
|
bool |
False |
Compress rotated files after sealing |
|
bool |
True |
Fsync inner sink after rotation |
|
bool |
False |
Fsync inner sink on every write |
|
dict |
PydanticUndefined |
Configuration for the inner sink |
|
str |
rotating_file |
Inner sink to wrap with sealing |
|
str |
None |
— |
|
str |
None |
env |
|
str |
None |
— |
|
bool |
False |
Reset chain state on rotation |
|
bool |
True |
Sign manifests when keys are available |
|
bool |
False |
Sign manifests via external KMS provider |
|
dict |
PydanticUndefined |
Configuration for stdout_json sink |
|
int |
1 |
Maximum events per webhook request (1 = no batching) |
|
float |
5.0 |
Max seconds before flushing a partial webhook batch. Accepts ‘5s’ or 5.0 |
|
str |
None |
— |
|
dict |
PydanticUndefined |
Additional HTTP headers |
|
float |
None |
— |
|
int |
None |
— |
|
str |
None |
— |
|
float |
5.0 |
Request timeout. Accepts ‘5s’ or 5.0 |
|
bool |
False |
Enable routing (False = fanout to all sinks) |
|
list |
PydanticUndefined |
Sinks used when no rules match |
|
bool |
True |
Allow events to match multiple rules |
|
list |
PydanticUndefined |
Routing rules in priority order |