Relyra.LoginTrace.Export (relyra v1.5.4)

Copy Markdown View Source

Shared redaction and export for login trace steps and audit rows.

LiveView and CLI both call this module so TRACE-03 redaction-equivalence is provable in tests.

Summary

Functions

Exports a login-domain audit row for UI/CLI display.

Exports a single consume-path step map with sensitive values scrubbed.

Functions

export_login(event)

@spec export_login(Relyra.Ecto.AuditEvent.t() | map()) :: map()

Exports a login-domain audit row for UI/CLI display.

Drops actor, hashes correlation_id, and maps nested steps through export_step/1.

export_step(step)

@spec export_step(map()) :: map()

Exports a single consume-path step map with sensitive values scrubbed.

Returns string-keyed maps containing only outcome, error_code, duration_ms, and redacted attribute summaries.