I’m trying to track down a performance issue and it’s easiest to do so in production (since it relies on the production database info) so I want to use an iex session to explore the performance issue. Can I enable ecto debug logging only for the current process? As far as I can tell the logging setting is global-only (via the application env).
The logging purge setting actually purges the code below that level, so that code is just gone at that point. The others you can enable but I think it’s enabled globally? Tracing is awesome though! Should learn it! It’s the way to debug on the BEAM!
How would you use tracing to figure out the database query times?
Because the query to the DB involves messages to the DB workers, and thus you can trace when that goes and comes back with the data to get the rough times.
Not perfectly accurate, but within a few milliseconds I’d imagine.