Feature-gated OTLP exporter for vox-telemetry: redacts at egress and ships events as OTLP LogRecords. Compiles to a no-op shim unless the remote feature is on.
OTLP egress for vox-telemetry. The pure core (project/redact/otlp_json) always compiles
(serde only). The remote feature adds the async network uploader — the compile-out unit:
--no-default-features builds contain zero reqwest/network symbols.
Encode a RedactedRecord into an OTLP/HTTP logs JSON envelope. The envelope is a minimal resourceLogs wrapper compatible with the OTLP/HTTP logs JSON framing (Content-Type: application/json). No opentelemetry SDK is used — we hand-encode the stable format with serde_json to avoid pulling the logs feature into the workspace-wide 0.29 otel pin. install_id is added to resource.attributes so the server can group events by installation (k-anonymity enforced server-side; the install_id itself is opaque and not user-identifiable).
fn
otlp_json::merge_otlp_log_batch
pub fn merge_otlp_log_batch(envelopes: &[Value]) -> Value
Merge multiple OTLP/HTTP log envelopes (or individual logRecords) into a single batched resourceLogs envelope (up to batch.len() records) so the uploader sends at most 1 HTTP POST per batch instead of N sequential requests (TELEM-03).
Async OTLP/HTTP uploader (feature remote only). Reads pending clean spool records and POSTs them to the central OTLP endpoint when is_remote_allowed() returns true.
Async OTLP/HTTP uploader with optional Bearer authentication token (TELEM-02, TELEM-03). Enforces vox_telemetry::config::is_remote_allowed(), reads .json files from spool_dir (or spool_dir/pending if present), batches up to [MAX_OTLP_BATCH_RECORDS] records into a single resourceLogs envelope via [merge_otlp_log_batch], POSTs to endpoint, and deletes acknowledged files on HTTP 2xx.