Replicant.Telemetry (Replicant v0.1.0)

Copy Markdown View Source

Value-free :telemetry.span/3 wrapper. Owns the metadata allowlist — the single enforcement point for "no row values in telemetry" (Critical Rule 1). LSNs, table names, counts, durations, and error classes are permitted; an off-allowlist key raises rather than shipping a value downstream. Mirrors arcadic's allowlist pattern.

Summary

Functions

allowed_meta_keys()

@spec allowed_meta_keys() :: [atom()]

The permitted span metadata keys.

event(name, measurements, meta)

@spec event([atom(), ...], map(), map()) :: :ok

span(op, start_meta, fun)

@spec span(atom(), map(), (-> {term(), map()})) :: term()