Relyra.Telemetry.Handlers.LoginTrace (relyra v1.4.0)

Copy Markdown View Source

Telemetry handler that accumulates consume-path span outcomes and flushes one domain: :login audit row per consume_response/3 attempt.

Hosts with Ecto should call attach(repo: MyApp.Repo) from Application.start/2 so login traces persist without manual telemetry wiring.

Login trace writes use AuditWriter.append_event/2 outside trust-mutation transactions. Sensitive keys are stripped before persistence.

Summary

Functions

attach(opts)

@spec attach(keyword()) :: :ok | {:error, :already_exists}

detach()

@spec detach() :: :ok | {:error, :not_found}