Add functionality to write metrics to the database.
log error properly (was missing stack traces)
gson parsed numbers need to be resolved to Double or Long instances prior to serialization.

Fixed those bugs and added tests to verify and look for regressions (we're relying on behavior of gson to determine long or double).
add a timer to measure performance.