Replicant emits 38 structure-only events for operators who monitor pipelines and sinks. Event metadata and measurements use closed key and value-shape allowlists. A rejected entry raises without including the rejected value.
The table lists direct events. See span/3 for the span API.
Events
| Event | Fires when | Measurements | Metadata |
|---|---|---|---|
[:replicant, :pipeline, :halted] | A permanent halt begins before asynchronous teardown | None | slot_name, structural atom reason, optional atom kind |
[:replicant, :connection, :connected] | The replication session connects or reconnects. | None | kind (:primary or :standby) |
[:replicant, :connection, :disconnected] | The connection drops. | None | None |
[:replicant, :connection, :health] | The receive watchdog requests a reply from an unpaused stream. | duration (milliseconds since the last frame) | slot_name |
[:replicant, :connection, :receive_timeout] | A watchdog probe receives no reply within the receive deadline. | duration (milliseconds since the last frame) | slot_name, reason: :receive_timeout |
[:replicant, :connection, :slot_release_wait] | A watchdog reconnect finds the slot still held by another backend. Repeats once per second while held. | duration (milliseconds waiting) | slot_name |
[:replicant, :connection, :paused] / :resumed | The queue crosses its intake watermarks. | byte_size, change_count, duration (elapsed pause in milliseconds) | slot_name |
[:replicant, :connection, :stalled] | Queued work has made no progress for at least five seconds. A warning and event repeat every five seconds until progress resumes. | byte_size, change_count, duration (milliseconds without a completed frame) | slot_name |
[:replicant, :buffer, :exhausted] | Retained payload exceeds the available buffer budget. | byte_size | slot_name, reason: :buffer_limit_exceeded |
[:replicant, :connection, :slot_active] | Replication starts, or the incremental snapshot starts streaming. | None | None |
[:replicant, :connection, :slot_invalidated] | Source checks or slot state prevent replication. | None | reason (:failover_unsupported, :publication_missing, invalidation class) |
[:replicant, :connection, :session_identity_rejected] | The sink rejects the replication-session identity. | None | reason: :session_identity_rejected |
[:replicant, :connection, :command_error_halt] | The pre-frame replication command exhausts its retry budget. | None | attempt, max_retries, slot_name |
[:replicant, :checkpoint, :advanced] | The connection advances the acknowledgment. | None | commit_lsn (kind: :idle on the idle-advance path) |
[:replicant, :checkpoint_store, :read] | The pipeline reads its library-owned checkpoint. | None | slot_name, commit_lsn (nil on a fresh slot) |
[:replicant, :checkpoint_store, :written] | A library-owned checkpoint commits. | None | slot_name, commit_lsn |
[:replicant, :checkpoint_store, :batch_flushed] | A batched checkpoint window flushes. | None | slot_name, change_count, byte_size (LSN span), reason (includes :max_buffer_bytes) |
[:replicant, :checkpoint_store, :retrying] | A transient store fault triggers a retry. | None | slot_name, attempt, max_retries |
[:replicant, :checkpoint_store, :failed] | A permanent or exhausted store fault halts delivery. | duration on individual checkpoint write failure | slot_name, reason |
[:replicant, :transaction, :assembled] | A committed transaction is ready for delivery. | None | commit_lsn, change_count, byte_size, lag_ms |
[:replicant, :sink, :committed] | The sink successfully applies a transaction. | duration | commit_lsn |
[:replicant, :sink, :batch_committed] | The sink successfully applies an atomic batch. | duration | commit_lsn, change_count, reason |
[:replicant, :sink, :failed] | The sink callback fails. | duration when timing the call | reason (for example :sink_failed or :spill_io_failed) |
[:replicant, :message, :received] | The assembler handles a logical-decoding message. | None | commit_lsn, byte_size, transactional |
[:replicant, :schema_change, :additive] | The assembler applies an additive schema change. | None | table, kind: :additive |
[:replicant, :schema_change, :halted] | A destructive schema change halts the pipeline. | None | table, kind: :destructive |
[:replicant, :snapshot, :started] | A snapshot or incremental backfill starts. | None | commit_lsn |
[:replicant, :snapshot, :resumed] | An incremental backfill resumes from durable progress. | None | slot_name |
[:replicant, :snapshot, :table_completed] | A table finishes snapshotting. | None | table, change_count |
[:replicant, :snapshot, :chunk_completed] | A backfill chunk is applied. | None | table, change_count |
[:replicant, :snapshot, :chunk_retried] | The reader discards a contended chunk and retries. | None | table, reason: :snapshot_table_contended |
[:replicant, :snapshot, :completed] | The snapshot finishes and hands off to streaming. | duration | commit_lsn, change_count |
[:replicant, :snapshot, :failed] | The snapshot or backfill fails. | None | reason (for example :snapshot_failed or :snapshot_table_contended), plus table on table-specific snapshot errors |
[:replicant, :stream, :committed] | A streamed transaction commits. | None | commit_lsn, byte_size (change_count on the folded path) |
[:replicant, :stream, :aborted] | A streamed transaction aborts. | None | reason: :stream_abort |
[:replicant, :stream, :spilled] | The assembler flushes streamed changes to disk. | None | byte_size, change_count |
[:replicant, :stream, :spill_exhausted] | The spill reaches its disk limit and halts the pipeline. | None | byte_size, reason: :spill_exhausted |
Summary
Functions
The permitted event measurement keys.
The permitted span/event metadata keys.
Emit a value-free telemetry event. BOTH measurements and meta are validated against their
closed key + value-shape contracts (validate!/1 and validate_measurements!/1 raise on an
off-list key or a wrong-shape value), so no row/column value can reach a telemetry consumer.
Wrap fun in a [:replicant, op] span, validating BOTH the start metadata and the returned
stop metadata against the value-free contract (validate!/1 raises on an off-list key or a
wrong-shape value). fun must return {result, stop_meta}. The span's own measurements
(monotonic_time/duration) are generated by :telemetry and are not user-supplied.
Functions
@spec allowed_measurement_keys() :: [atom()]
The permitted event measurement keys.
@spec allowed_meta_keys() :: [atom()]
The permitted span/event metadata keys.
Emit a value-free telemetry event. BOTH measurements and meta are validated against their
closed key + value-shape contracts (validate!/1 and validate_measurements!/1 raise on an
off-list key or a wrong-shape value), so no row/column value can reach a telemetry consumer.
Wrap fun in a [:replicant, op] span, validating BOTH the start metadata and the returned
stop metadata against the value-free contract (validate!/1 raises on an off-list key or a
wrong-shape value). fun must return {result, stop_meta}. The span's own measurements
(monotonic_time/duration) are generated by :telemetry and are not user-supplied.