Log Ecto queries, and output warnings for slow or possible n+1 queries
To set up, simply add EctoSparkles.Log.setup(YourApp.Repo) in your app's main Application.start/2 module.
Summary
Functions
Converts a telemetry :native time to microseconds (nil/garbage-safe: returns 0).
The telemetry event id for the repo's queries (e.g. [:bonfire, :common, :repo, :query]),
derived from the repo's :telemetry_prefix config (falling back to Ecto's module-name default).
The canonical helper for every consumer of the repo query event.
Functions
Converts a telemetry :native time to microseconds (nil/garbage-safe: returns 0).
The telemetry event id for the repo's queries (e.g. [:bonfire, :common, :repo, :query]),
derived from the repo's :telemetry_prefix config (falling back to Ecto's module-name default).
The canonical helper for every consumer of the repo query event.