AshReplicant.Telemetry (AshReplicant v0.2.0)

Copy Markdown View Source

Value-free telemetry. Owns the metadata allowlist — the single enforcement point for "no row value in telemetry". An off-allowlist key raises rather than shipping a value downstream. Mirrors replicant/ash_arcadic.

The allowlist gates metadata KEYS. Values under an allowlisted key (reason, table, tenant?, resource, …) remain the caller's value-free responsibility — pass atoms, modules, integers, or booleans, never a raw row value or DB message.

Summary

Functions

allowed_meta_keys()

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

The permitted metadata keys.

event(name, measurements, meta)

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

span(op, start_meta, fun)

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