ElixirScope.Capture.AsyncWriter (elixir_scope v0.0.1)

AsyncWriter is a worker process that consumes events from ring buffers, enriches them with metadata, and processes them asynchronously.

Key responsibilities:

  • Read events from ring buffers in configurable batches
  • Enrich events with correlation and processing metadata
  • Handle errors gracefully without affecting the pipeline
  • Track processing metrics and performance

Summary

Functions

Returns a specification to start this module under a supervisor.

Enriches an event with correlation and processing metadata.

Gets current metrics about processing performance.

Gets the current state of the AsyncWriter.

Sets the current position in the ring buffer.

Starts an AsyncWriter with the given configuration.

Gracefully stops the AsyncWriter.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

enrich_event(event)

Enriches an event with correlation and processing metadata.

get_metrics(pid)

Gets current metrics about processing performance.

get_state(pid)

Gets the current state of the AsyncWriter.

set_position(pid, position)

Sets the current position in the ring buffer.

start_link(config)

Starts an AsyncWriter with the given configuration.

stop(pid)

Gracefully stops the AsyncWriter.