init: Add Uptime.DBusCrash histogram.

Add a metric to record the system's uptime when it is
rebooted automatically after a dbus-daemon crash.

BUG=chromium:432980
TEST=manual: forced a crash and then checked that metric was
     reported to chrome after reboot

Change-Id: I58d37b905fc0dd4f15961eae22859a7e67e9ae08
Reviewed-on: https://chromium-review.googlesource.com/239262
Trybot-Ready: Dan Erat <derat@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
diff --git a/init/dbus.conf b/init/dbus.conf
index 0c9ddd7..98b9651 100644
--- a/init/dbus.conf
+++ b/init/dbus.conf
@@ -38,5 +38,7 @@
   # they won't be able to talk to each other. Instead of attempting to
   # respawn dbus-daemon, reboot the system to get back to a sane state.
   logger -t "$UPSTART_JOB" "dbus-daemon exited unexpectedly; rebooting"
+  uptime_sec=$(awk '{ print $1 }' </proc/uptime)
+  metrics_client -t Uptime.DBusCrash "${uptime_sec}" 1 1000000 50
   reboot
 end script