use enum for logging and metrics type for metrics property
apply review comments