[cobalt] Track setSoftwareDistributionInfo calls.

Removed unused set_channel_called metric and added
set_software_distribution_info_called.

BUG: 52336
Change-Id: I5c9165036c76c8dcf46afb85e9fc7592699281f3
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt-registry/+/392215
Commit-Queue: Jared Weinstein <jaredweinstein@google.com>
Reviewed-by: Zach Bush <zmbush@google.com>
diff --git a/cobalt_internal/metrics/metrics.yaml b/cobalt_internal/metrics/metrics.yaml
index 59c8906..4dc7e7d 100644
--- a/cobalt_internal/metrics/metrics.yaml
+++ b/cobalt_internal/metrics/metrics.yaml
@@ -5,36 +5,6 @@
 metric_definitions:
 
 #####################################################################
-# set_channel_called
-#
-# Whenever the SetChannel() method from the SystemDataUpdater interface is
-# invoked, we log "1" along with an indication of the current and new channels.
-#####################################################################
-- id: 2
-  metric_name: "set_channel_called"
-  metric_type: EVENT_COUNT
-  metric_dimensions:
-    - dimension: new_channel
-      event_codes:
-        1: Unknown
-        3: Valid
-    - dimension: previous_channel
-      event_codes:
-        0: Unset    # SetChannel was not called before.
-        1: Unknown  # SetChannel was called with an empty string.
-        3: Valid    # SetChannel was called with something else.
-  reports:
-    - report_name: "set_channel_called_count_per_device"
-      id: 2249694334 # legacy long report_id
-      report_type: PER_DEVICE_NUMERIC_STATS
-      window_size: [1]
-      aggregation_type: SUM
-      system_profile_field: [PRODUCT_NAME]
-  meta_data:
-    max_release_stage: GA
-    expiration_date: "2020/05/06"
-
-#####################################################################
 # per_device_bytes_uploaded
 #
 # This metric will be used to generate a report that gives statistics about the
@@ -286,3 +256,48 @@
   meta_data:
     max_release_stage: GA
     expiration_date: "2020/11/20"
+
+#####################################################################
+# set_software_distribution_info_called
+#
+# Whenever the SetSoftwareDistributionInfo() method from the SystemDataUpdater interface is
+# invoked, we log "1" along with an indication of the current and new channels and realms.
+#####################################################################
+- id: 10
+  metric_name: "set_software_distribution_info_called"
+  metric_type: EVENT_COUNT
+  metric_dimensions:
+    - dimension: new_channel
+      event_codes:
+        1: Unknown
+        3: Valid
+    - dimension: previous_channel
+      event_codes:
+        0: Unset    # SetSoftwareDistributionInfo was not called before.
+        1: Unknown  # SetSoftwareDistributionInfo called with null channel.
+        3: Valid    # SetSoftwareDistributionInfo called with channel string.
+    - dimension: new_realm
+      event_codes:
+        1: Unknown
+        3: Valid
+    - dimension: previous_realm
+      event_codes:
+        0: Unset    # SetSoftwareDistributionInfo was not called before.
+        1: Unknown  # SetSoftwareDistributionInfo called with null realm.
+        3: Valid    # SetSoftwareDistributionInfo called with realm string.
+  reports:
+    - report_name: "set_software_distribution_info_called_count_per_device_realm"
+      id: 1
+      report_type: PER_DEVICE_NUMERIC_STATS
+      window_size: [1]
+      aggregation_type: SUM
+      system_profile_field: [PRODUCT_NAME, REALM]
+    - report_name: "set_software_distribution_info_called_count_per_device_channel"
+      id: 2
+      report_type: PER_DEVICE_NUMERIC_STATS
+      window_size: [1]
+      aggregation_type: SUM
+      system_profile_field: [PRODUCT_NAME, CHANNEL]
+  meta_data:
+    max_release_stage: GA
+    expiration_date: "2021/05/01"