PhoenixReplay.Storage.Retention (PhoenixReplay v0.6.2)

Copy Markdown View Source

Deletes stored recordings beyond the configured age or count.

Runs every retention.interval milliseconds when :max_age or :max_count is configured; otherwise the process stays idle. Recordings still in the buffer are never pruned.

Summary

Functions

Returns a specification to start this module under a supervisor.

Selects summaries older than max_age or beyond the newest max_count.

Deletes every stored recording that expired/3 selects. Returns the deleted ids.

Starts the retention process registered under its module name.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

expired(summaries, map, now)

Selects summaries older than max_age or beyond the newest max_count.

summaries must be ordered most recent first.

prune(config, now \\ now())

Deletes every stored recording that expired/3 selects. Returns the deleted ids.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

Starts the retention process registered under its module name.