Traditionally, postinstall (run at the end of installs and updates) hasn't had a need for metrics. There are several reasons for this, including:
ChromeOS Flex, however, supports installation in schools/businesses and homes, and does more in postinst to support the variety of firmware seen on generic consumer devices. To support this, it makes sense to add some metrics to postinstall.
Postinst (and other installer histograms) defined here.
On ChromeOS metrics sent by non-browser processes are normally recorded in /var/lib/metrics/uma-events. Every few minutes the browser moves the contents of that file into its internal metrics log, and every half hour the browser sends its internal log to the UMA servers. When the browser is shut down it persists its metrics log to disk, to be sent on the next startup.
ChromeOS Flex style installs complicate this. There are two copies of the OS: the live-booted ‘installer’ (e.g. ChromeOS running from a USB), and the ‘target’ OS (being written to the device itself). Any metrics recorded while running the live booted OS will remain on the USB which may never be booted again. There's a ticket for fixing this, possibly by copying metrics from the installer to the target.
If the install fails, however, there‘s no target OS to send the metrics. Further, users running the installer may not bother connecting to the internet, so install failure metrics are very likely to be lost. There’s a ticket for encouraging users to connect to the internet when an install fails.
A failed update, however, should be able to send metrics most of the time. The one failure case would be an update that causes unrecoverable boot failure, and where the user reboots within the (< 30 minute) window after the update is applied and before the browser sends the metrics.