Refactoring for better separation between tx metrics and django metrics