Tools for integrating Ecto with Spandex
Due to some recent changes in Ecto, we can no longer effectively trace the execution of parallel preloads. All other queries work fine, but until we figure something out that leverages either telemetry or until the task feature listed here is added to the language, we won't be able to support tracing parallel preloads.
Add spandex_ecto
to your list of dependencies in mix.exs
:
def deps do
[
{:spandex_ecto, "~> 0.5.0"}
]
end
Configuration
config :spandex_ecto, SpandexEcto.EctoLogger,
service: :ecto, # Optional
tracer: MyApp.Tracer, # Required
# Be aware that this is a *compile* time configuration. As such, if you change this you
# may need to `mix compile --force` and/or `mix deps.compile --force ecto`
config :my_app, MyApp.Repo,
loggers: [{Ecto.LogEntry, :log, [:info]}, {SpandexEcto.EctoLogger, :trace, ["database_name"]}]