Move db tracing to it's own module