add parse_error metric definition
Add Cobalt definition for the parse_error metric for FTS.
Bug: 41856
Test: fx build
Change-Id: I688bab246951748389246d2fe0ed325c8526233c
diff --git a/fuchsia/flash_ts/metrics.yaml b/fuchsia/flash_ts/metrics.yaml
index e2e3d7a..c9cc430 100644
--- a/fuchsia/flash_ts/metrics.yaml
+++ b/fuchsia/flash_ts/metrics.yaml
@@ -115,3 +115,49 @@
meta_data:
max_release_stage: GA
expiration_date: "2021/01/21"
+
+#####################################################################
+# parse_error
+#
+# Count of times we encountered errors parsing FTS data. This metric
+# is primarily intended to help debug parsing problems. However, it
+# may be affected by I/O and storage problems as well.
+#
+# Reporting frequency
+# * For most devices, this event should never be reported.
+# * For devices with corrupt flash memory, or devices that were
+# programmed incorrectly at the factory, every time flash_ts
+# starts, the program will log each observed parse error once.
+# (We may encounter multiple kinds of errors, because devices may
+# have multiple copies of the FTS data.)
+#####################################################################
+- id: 4
+ metric_name: parse_error
+ metric_type: EVENT_OCCURRED
+ metric_dimensions:
+ - dimension: result
+ event_codes:
+ 0: ShortChunk
+ 1: BlankChunk
+ 2: BadHeader
+ 3: BadPayloadLen
+ 4: BadChecksum
+ 5: BadProperties
+ 6: MissingTerminator
+ 7: BadPadding
+ 8: BadTableVersionNum
+ max_event_code: 8
+ reports:
+ #####################################################################
+ # parse_error_counts
+ #
+ # Count of each of the types of parse_error occurrences.
+ #####################################################################
+ - report_name: parse_error_counts
+ id: 1
+ report_type: SIMPLE_OCCURRENCE_COUNT
+ local_privacy_noise_level: NONE
+ system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
+ meta_data:
+ max_release_stage: GA
+ expiration_date: "2021/01/21"