From 3fdd05bf4635aafe2f415b23e869752aaa0555c0 Mon Sep 17 00:00:00 2001 From: Philip Z Date: Wed, 25 Nov 2026 18:29:31 +0800 Subject: [PATCH] Document runtime environment variables --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index c7b074dc..1b714fcb 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,50 @@ is labeled `MASKED; NOT REPLAYABLE`; SQL that cannot be safely rendered is omitt Application mutation audits are delivered after commit and discarded on rollback. This is not a durable audit outbox. Do not put secrets in comment or purpose. +## Environment variables + +### Runtime logging + +| Environment variable | Default | Values and behavior | +| --- | --- | --- | +| `TEAQL_DOMAIN` | The single configured model name, or `teaql` | Runtime log name and default filename stem. An explicit log name in startup options takes precedence. | +| `TEAQL_LOG_ENDPOINT` | `./logs/.log` | Local path, local `file:` URL, `stdout`, `stderr`, or `-` for stdout. Relative paths resolve from the working directory. Rotation applies to files. | +| `TEAQL_LOG_FORMAT` | `json` | `json` writes one structured record per line. `human` renders readable text. An explicit startup format takes precedence. | +| `TEAQL_LOG_MAX_SIZE` | `50M` | File rotation threshold. Use positive bytes or a binary suffix `K`, `KB`, `M`, `MB`, `G`, or `GB`. | +| `TEAQL_LOG_MAX_FILES` | `7` | Maximum number of rotated files. Use a nonnegative integer. `0` keeps only the active file. | +| `TEAQL_ALLOW_SENSITIVE_PLAINTEXT_LOGS` | Unset | The exact value `I_UNDERSTAND_SENSITIVE_DATA_MAY_BE_WRITTEN_TO_DISK` allows eligible application values in explicitly configured diagnostic output. Credential fields stay redacted. | + +### OpenTelemetry + +Add the optional `io.teaql:teaql-opentelemetry` artifact to the application classpath. + +| Environment variable | Default | Values and behavior | +| --- | --- | --- | +| `TEAQL_TELEMETRY_ENABLED` | `false` | `true` enables the standard module. Set the service name and Collector endpoint as well. `false` disables export. | +| `TEAQL_TELEMETRY_SERVICE_NAME` | Unset | Required when enabled. Use 1–120 ASCII letters, digits, underscores, periods, or hyphens. | +| `TEAQL_TELEMETRY_OTLP_ENDPOINT` | Unset | Required when enabled. OTLP/HTTP Collector base URL, for example `http://localhost:4318`. Use an absolute HTTP(S) URL without user information, a query, or a fragment. | + +### Optional log module + +These settings apply to `teaql-runtime-log`. This module gives JVM system properties +precedence over environment variables of the same name. Its formatter defaults +to `human` and also accepts `debug` as an alias for `json`. + +| Environment variable | Default | Values and behavior | +| --- | --- | --- | +| `TEAQL_AUDIT_LOG` | `_full` | Audit detail. Accepts `_silent`, `_summary`, `_full`, or `_full_with_payload`. | +| `TEAQL_SQL_LOG` | `_summary` | SQL detail. Accepts `_silent`, `_summary`, `_full`, or `_full_with_payload`. | +| `TEAQL_TOOL_LOG` | `_full` | Tool detail. Accepts `_silent`, `_summary`, `_full`, or `_full_with_payload`. | +| `TEAQL_AUDIT_LOG_ENTITIES` | Unset | Comma-separated entity names for audit logging. Matches names case-insensitively. | +| `TEAQL_SQL_LOG_TABLES` | Unset | Comma-separated table-name filters. Matches case-insensitive substrings of the SQL. | +| `TEAQL_TOOL_LOG_FOCUS` | Unset | Comma-separated tool module names. Matches names case-insensitively. | + +### Entity references + +| Environment variable | Default | Values and behavior | +| --- | --- | --- | +| `TEAQL_UNSAFE_EXPOSE_RAW_ENTITY_IDS` | Unset | The process-environment reference provider enables raw entity IDs only with `I_UNDERSTAND_THIS_EXPOSES_INTERNAL_ENTITY_IDS_FOR_LOCAL_DEBUGGING_ONLY` on a non-production profile. A production profile rejects that setting. | + ## Discover only the API needed next A coding agent does not need every generated method in its context. Start with