Insider.Collector.Telemetry (Insider v0.1.0)

Copy Markdown View Source

Bounded, allowlist-only ingestion of :telemetry events.

Telemetry executes handlers synchronously in the emitting process. The installed handler therefore performs bounded scalar projection and one fixed-slot ETS write; this process drains records and maintains bounded lifecycle-pair health away from the caller's hot path.

Each accepted event is attributed to the bounded PID of its synchronous emitter, allowing consumers to distinguish subject-correlated evidence from ambient events.

With rich: true the handler records every metadata key as a rendered, bounded payload, and every measurement unless the policy selects some, with credentials masked. The live session's rich disclosure profile uses it; the policy's metadata allowlist then does not apply.

Summary

Functions

Returns a specification to start this module under a supervisor.

Detaches the handler, drains the inbox, records every pending summary interval, and stops: the stop a sealed session's last read relies on. Returns the handler cleanup and the collector's final status.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

flush(server)

@spec flush(GenServer.server()) :: {:ok, map()} | {:error, :unavailable}

seal(server)

@spec seal(GenServer.server()) ::
  {:ok, %{handler: atom(), status: map()}} | {:error, :unavailable}

Detaches the handler, drains the inbox, records every pending summary interval, and stops: the stop a sealed session's last read relies on. Returns the handler cleanup and the collector's final status.

start_link(arg1)

start_link(recorder, policy, options)

status(server)

@spec status(GenServer.server()) :: {:ok, map()} | {:error, :unavailable}

stop(server)

@spec stop(GenServer.server()) :: {:ok, map()} | {:error, :unavailable}