TimelessMetrics.IngestWorker (timeless_metrics v6.0.13)

Copy Markdown View Source

Background ingest worker that drains raw HTTP bodies from an ETS queue, parses them, resolves series, and writes to Buffer shards.

The HTTP handler inserts raw bodies into the queue and returns 204 immediately. This worker processes them in the background.

Multiple workers share one ETS queue table. Each worker takes batches using :ets.take (atomic) to avoid contention.

Summary

Functions

Returns a specification to start this module under a supervisor.

Queue a raw HTTP body for background processing.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

enqueue(queue_table, body, format)

Queue a raw HTTP body for background processing.

Called from the HTTP handler. Returns immediately. format is :prometheus or :json.

start_link(opts)