9. Deployment inputs and preflight¶
Collector YAML reads environment variables directly. config.env.example
lists safe defaults and empty secret placeholders. Deployments should inject only values needed by the
selected composition and must not persist populated copies as build artifacts.
Common intake and exporter inputs¶
| Variable | Default in YAML | Used by |
|---|---|---|
OTELCOL_MEMORY_LIMIT_MIB |
512 in base |
Memory limiter |
OTELCOL_MEMORY_SPIKE_LIMIT_MIB |
128 in base |
Memory limiter |
OTELCOL_TRACE_SAMPLING_PERCENTAGE |
100 |
Base probabilistic trace sampler |
OTELCOL_BATCH_TIMEOUT |
1s |
Base and tail batch processors |
OTELCOL_BATCH_SEND_SIZE |
8192 |
Base and tail batch processors |
OTELCOL_BATCH_MAX_SIZE |
16384 |
Base and tail batch processors |
OTELCOL_EXPORT_TIMEOUT |
5s |
Remote backend and tail-router exporters |
OTELCOL_EXPORT_RETRY_WINDOW |
1m normally; required in persistent overlays |
Remote backend retry maximum |
OTELCOL_EXPORT_QUEUE_CONSUMERS |
2 |
Remote backend queues |
OTELCOL_EXPORT_QUEUE_SIZE |
1000 normally; required in persistent overlays |
Remote backend queue capacity |
Ingress and backend inputs¶
| Family | Required or optional variables |
|---|---|
| Gateway ingress | OTELCOL_INGRESS_TLS_CERT_FILE, OTELCOL_INGRESS_TLS_KEY_FILE, OTELCOL_INGRESS_BEARER_TOKEN |
| Honeycomb | HONEYCOMB_API_KEY; optional endpoint defaults to https://api.honeycomb.io |
| Grafana Cloud | GRAFANA_CLOUD_OTLP_ENDPOINT, GRAFANA_CLOUD_BASIC_AUTH |
| Local Grafana | Optional GRAFANA_LOCAL_OTLP_GRPC_ENDPOINT, default lgtm:4317 |
| Self-managed | TEMPO_OTLP_GRPC_ENDPOINT, MIMIR_OTLP_HTTP_ENDPOINT, LOKI_OTLP_HTTP_ENDPOINT, GRAFANA_SELF_MANAGED_AUTHORIZATION, GRAFANA_SELF_MANAGED_TENANT_ID; OTELCOL_BACKEND_TLS_INSECURE defaults false |
| Local capture | OTELCOL_CAPTURE_DIRECTORY, default /var/lib/otelcol/capture |
The repository's Python preflight does not validate vendor URL syntax, secret strength, certificate contents, DNS, storage mounts, or whether production deployments leave insecure TLS disabled. Native Collector validation checks configuration shape using synthetic values; deployment systems must enforce the remaining operational requirements.
Persistent profile inputs¶
| Variable | Preflight range or rule | Consumed by Collector YAML? |
|---|---|---|
OTELCOL_STORAGE_DIRECTORY |
Absolute, non-root path | Yes |
OTELCOL_EXPORT_QUEUE_SIZE |
Integer 1–10,000,000 | Yes |
OTELCOL_STORAGE_CAPACITY_BYTES |
Integer 1 MiB–2^50 | No; declared sizing contract |
OTELCOL_STORAGE_VOLUME_QUOTA_BYTES |
Integer 1 MiB–2^50 and at least declared capacity | No; deployment contract |
OTELCOL_REQUIRED_OUTAGE_SECONDS |
Integer 1–604,800 | No; deployment objective |
OTELCOL_EXPORT_RETRY_WINDOW |
Duration 1–604,800 seconds and at least outage seconds | Yes |
OTELCOL_DRAIN_HEADROOM_PERCENT |
Finite number 1–90 | No; deployment objective |
Accepted duration syntax is one non-negative integer or decimal followed by ms, s, m, or h, with
no compound units.
The preflight checks consistency among declared inputs. It does not measure request rate, bytes per
request, disk overhead, or recovery throughput. Operators size with measured peak export-request rate
R, p95 bytes per request B, outage seconds O, and headroom fraction H:
queue items >= ceil(R * O)
storage bytes >= ceil(R * B * O), including file-storage overhead
recovery capacity >= R / (1 - H)
drain time = queued requests / (recovery requests per second - R)
These equations are documented operational requirements; the script cannot verify them because it does
not receive measured R, B, or recovery capacity.
Tail profile inputs¶
| Variable | Preflight range or rule | YAML use |
|---|---|---|
OTELCOL_TAIL_SAMPLER_DNS |
No Python validation; defaults tail-sampler |
Router DNS resolver |
OTELCOL_TAIL_SAMPLER_PORT |
No Python validation; defaults 4317 |
Router DNS resolver |
OTELCOL_TAIL_TLS_INSECURE |
No Python validation; defaults false |
Router OTLP client |
OTELCOL_TAIL_ROUTER_QUEUE_SIZE |
Integer 1–10,000,000 | Router queue; required without YAML fallback |
OTELCOL_TAIL_DECISION_WAIT |
Duration 1–300 seconds | Tail sampler |
OTELCOL_TAIL_ROOT_GRACE_PERIOD |
Duration 0.001 seconds through decision wait | Tail sampler |
OTELCOL_TAIL_NUM_TRACES |
Integer 1–10,000,000 and capacity constraint below | Tail sampler |
OTELCOL_TAIL_EXPECTED_TRACES_PER_SEC |
Integer 1–1,000,000 | Tail sampler and preflight |
OTELCOL_TAIL_MAX_TRACE_SIZE_BYTES |
Integer 1 KiB–64 MiB | Tail sampler and preflight |
OTELCOL_TAIL_SAMPLED_CACHE_SIZE |
Integer 1–10,000,000 | Decision cache |
OTELCOL_TAIL_DROPPED_CACHE_SIZE |
Integer 1–10,000,000 | Decision cache |
OTELCOL_TAIL_DROP_PENDING_TRACES_ON_SHUTDOWN |
Must case-fold to true |
Tail sampler |
OTELCOL_TAIL_INCOMPLETE_TRACE_BEHAVIOR |
Must equal decide-at-timeout |
Preflight declaration only |
OTELCOL_TAIL_LATE_SPAN_BEHAVIOR |
Must equal follow-original-decision |
Preflight declaration only |
OTELCOL_TAIL_SLOW_TRACE_MS |
Integer 1–3,600,000 | Latency policy |
OTELCOL_TAIL_BASELINE_PERCENTAGE |
Finite number 0–100 | Probabilistic policy |
OTELCOL_MEMORY_LIMIT_MIB |
Integer 64–131,072 | Sampler memory limiter |
OTELCOL_MEMORY_SPIKE_LIMIT_MIB |
Integer 1 through memory limit minus one | Sampler memory limiter |
The preflight enforces:
OTELCOL_TAIL_NUM_TRACES
>= ceil(expected traces per second * decision wait seconds)
OTELCOL_TAIL_NUM_TRACES * maximum trace bytes
<= (memory limit MiB - spike MiB) * 1,048,576
OTELCOL_TAIL_INCOMPLETE_TRACE_BEHAVIOR and OTELCOL_TAIL_LATE_SPAN_BEHAVIOR make operational intent
explicit but are not interpolated into the current Collector YAML. The implemented behavior comes from
the tail-sampling component configuration: trace-complete strategy, decision timing, decision caches,
and drop-pending-on-shutdown.
Preflight command behavior¶
scripts/validate_collector_profiles.py --preflight persistent|tail first verifies image pins and static
repository invariants, then validates the current process environment without invoking Docker. Missing
inputs fail with the variable name and rule. It prints a single success line on completion and exits 1 on
OSError, RuntimeError, or ValueError.
Static checks also require exactly COLLECTOR_IMAGE, TELEMETRYGEN_IMAGE, and
GRAFANA_LGTM_IMAGE in images.env, require digest pins without :latest, match the Collector and
Grafana LGTM digests to compatibility.toml, ensure every declared composition file exists, scan YAML
for a small set of obvious credential literals, prevent a
probabilistic sampler in the tail router, require advanced capacity variables without YAML fallbacks,
and require every persistent backend overlay to configure file storage, queue size, and retry window.
The literal scan case-folds all committed Collector YAML and rejects x-honeycomb-team: honey,
password: grafana, and api_key:.
Image pins¶
The checked-in images.env pins multi-architecture OCI indexes for Collector contrib, telemetrygen,
and the local Grafana LGTM stack by SHA-256 digest. Static validation confirms pin shape and Collector
and LGTM compatibility-manifest agreement; it does not resolve or re-sign the digests. Docker-based
validation, local verification, and the opt-in Grafana topology pull or run those exact image references.