Supervised recorder for Armature MCP analytics events.
:background delivery batches events in this process. :await sends the
relevant batch before the record call returns. Neither mode exposes delivery
failures to tool handlers.
Summary
Functions
Flushes all queued events.
Records a session initialization once per actor/session pair.
Records one tool call according to the configured delivery mode.
Starts a recorder.
Types
@type option() :: {:api_key, String.t() | nil} | {:ingest_url, String.t() | nil} | {:delivery, :background | :await} | {:name, GenServer.name() | nil} | {:enabled, boolean()} | {:emit, (map() -> :ok | {:error, map()})} | {:on_error, (map() -> term())} | {:redact_event, (map() -> map() | nil)} | {:req_options, keyword()} | {:flush_interval_ms, pos_integer()}
Functions
@spec flush(GenServer.server()) :: :ok
Flushes all queued events.
@spec record_session(GenServer.server(), map()) :: :ok
Records a session initialization once per actor/session pair.
@spec record_tool_call(GenServer.server(), map()) :: :ok
Records one tool call according to the configured delivery mode.
@spec start_link([option()]) :: GenServer.on_start()
Starts a recorder.