Add type specs for all these functions and mark as private. You don't have to spec them to death. E.g. `{atom, term()}` is probably okay for `format_query_latency`.