You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(webapp): parallelize OTLP ingest transform via a worker pool (flag-gated)
Behind OTEL_TRANSFORM_WORKER_POOL_ENABLED (default off), OTLP protobuf decode + convert
+ enrich (incl. LLM pricing match/calculateCost) run in a worker_threads pool instead of
the request event loop. The main thread stays the single DB reader (broadcasts compiled
model rows to workers via ModelPricingRegistry.loadFromModels) and keeps the existing
consolidated insertMany path, so ClickHouse insert cadence and part count are unchanged.
Adds: otlpTransformWorker (worker entry), otlpWorkerPool (hand-rolled worker_threads pool
with per-worker single-flight, pricing broadcast, respawn-on-crash), exporter exportXRaw
dispatch methods + flag, route wiring, a bundled build:otlpworker esbuild step, and
ModelPricingRegistry.loadFromModels/toSerializable (prisma-optional) + tests.
Local e2e on an isolated stack: flag-on sustained ~2.6x throughput (997 -> 2612 spans/s)
and kept the main-thread health check responsive (0.5-2.5s vs 4.6-10.4s) at identical load;
enriched events with registry-sourced cost verified in ClickHouse via the worker path.
0 commit comments