Emits :telemetry events for one database. Start it after Slap.SlateDB.open/2,
usually under the supervisor that owns the database:
{:ok, db} = Slap.SlateDB.open("orders", store: store)
{:ok, _pid} = Slap.SlateDB.Telemetry.start_link(db: db, metadata: %{name: "orders"})Events, each with the :metadata option as metadata:
[:slap, :slatedb, :durable]-%{durable_seq: seq}, when the durable sequence number goes up. Updates are coalesced, as forSlap.SlateDB.subscribe/3.[:slap, :slatedb, :stats]-Slap.SlateDB.stats/1, every:intervalms (default 10,000).[:slap, :slatedb, :closed]-%{}, with:reasonadded to the metadata (:clean,:fenced,:panicor:unknown), once, when the database closes. The process then stops normally.
Options: :db (required), :metadata (a map, default %{}), :interval.
A supervised child uses its database handle as part of its child ID, so
one supervisor can run telemetry for multiple databases.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()