blob: 578be45babcb7f71e0c37f7d8a9c9706fcde549a [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
################################################################################
# Cobalt Project: software_delivery
################################################################################
metric_definitions:
################################################################################
# System Up To Date
#
# Used to log the fact that an update check was performed, but the system is
# already running the latest version.
################################################################################
- id: 1
metric_name: system_up_to_date
# The count will always be one.
metric_type: EVENT_COUNT
metric_dimensions:
# What initiated the update check?
- dimension: initiator
event_codes:
0: AutomaticUpdateCheck
1: UserInitiatedCheck
# When did the update check occur?
- dimension: hour_of_day
max_event_code: 23
reports:
- report_name: system_up_to_date_counts
id: 3897546620 # legacy long report_id
report_type: NUMERIC_AGGREGATION
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: system_up_to_date_per_device_count
id: 2703326378 # legacy long report_id
report_type: PER_DEVICE_NUMERIC_STATS
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
window_size:
- 1
meta_data:
max_release_stage: GA
expiration_date: "2020/04/15"
################################################################################
# OTA Start
#
# Used to log the fact that an update is available and is being applied.
################################################################################
- id: 2
metric_name: ota_start
metric_type: EVENT_COUNT
metric_dimensions:
# What initiated the update check?
- dimension: initiator
event_codes:
0: AutomaticUpdateCheck
1: UserInitiatedCheck
# When did the update check occur?
- dimension: hour_of_day
max_event_code: 23
reports:
- report_name: ota_start_counts
id: 276244619 # legacy long report_id
report_type: NUMERIC_AGGREGATION
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION]
meta_data:
max_release_stage: GA
expiration_date: "2020/04/15"
################################################################################
# OTA Result Attempts
#
# Used to log OTA attempt number, at the point that update was applied and is
# ready to be booted, or an error was encountered during the update attempt
################################################################################
- id: 3
metric_name: ota_result_attempts
# The value of the count will be the attempt number.
metric_type: EVENT_COUNT
metric_dimensions:
# What initiated the update check?
- dimension: initiator
event_codes:
0: AutomaticUpdateCheck
1: UserInitiatedCheck
# At which phase did the update terminate?
- dimension: phase
event_codes: &ota_result_termination_phases
1: TUFUpdate
2: PackageDownload
3: ImageWrite
4: SuccessPendingReboot
5: Success
- dimension: status_code
event_codes: &ota_result_status_codes
0: success
1: error
2: error_storage
3: error_storage_out_of_space
4: error_networking
5: error_untrusted_tuf_repo
reports:
- report_name: ota_result_attempts_histogram
id: 1235984927 # legacy long report_id
report_type: INT_RANGE_HISTOGRAM
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION]
int_buckets:
linear:
floor: 0
num_buckets: 100
step_size: 1
- report_name: ota_result_attempts
id: 1004304452 # legacy long report_id
report_type: NUMERIC_AGGREGATION
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION]
meta_data:
max_release_stage: GA
expiration_date: "2020/04/15"
################################################################################
# OTA Result Duration
#
# Used to log the duration of an OTA at the point that an update was
# applied and is ready to be booted, or an error was encountered during the
# update attempt
################################################################################
- id: 4
metric_name: ota_result_duration
# How long the update took from start to finish (not counting any necessary
# reboot), in milliseconds
metric_type: ELAPSED_TIME
metric_dimensions:
# What initiated the update check?
- dimension: initiator
event_codes:
0: AutomaticUpdateCheck
1: UserInitiatedCheck
# At which phase did the update terminate?
- dimension: phase
event_codes: *ota_result_termination_phases
- dimension: status_code
event_codes: *ota_result_status_codes
reports:
- report_name: ota_result_duration_histogram
id: 845188937 # legacy long report_id
report_type: INT_RANGE_HISTOGRAM
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION]
int_buckets:
linear:
floor: 0
num_buckets: 100
step_size: 500
- report_name: ota_result_duration__stats
id: 3514494109 # legacy long report_id
report_type: NUMERIC_AGGREGATION
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION]
meta_data:
max_release_stage: GA
expiration_date: "2020/04/15"
################################################################################
# OTA Result Free-Space Delta
#
# Used to log the delta between the free space after the OTA and the free space
# before the OTA, at the point that update was applied and is ready to be
# booted, or an error was encountered during the update attempt
################################################################################
- id: 5
metric_name: ota_result_free_space_delta
metric_type: EVENT_COUNT
metric_dimensions:
# What initiated the update check?
- dimension: initiator
event_codes:
0: AutomaticUpdateCheck
1: UserInitiatedCheck
# At which phase did the update terminate?
- dimension: phase
event_codes: *ota_result_termination_phases
- dimension: status_code
event_codes: *ota_result_status_codes
reports:
- report_name: ota_result_free_space_delta_stats
id: 4160859516 # legacy long report_id
report_type: NUMERIC_AGGREGATION
# The |component| string is used to capture the target build version
candidate_file: fuchsia/software_delivery/build_versions.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME]
meta_data:
max_release_stage: GA
expiration_date: "2020/04/15"
################################################################################
# Fetch Blob Success
#
# Used to log a 1 every time fetch_blob fails or succeeds. This statistic does
# not dedup retries. This would happens a lot after a new package was registered
# but infrequently after that. This would occur thousands of times after an
# update over a few minute or so. Updates are expected to be monthly however. So
# bursts of more than one per second are expected.
################################################################################
- id: 6
metric_name: fetch_blob
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: CreateBlob
2: BadHttpStatus
3: NoMirrors
4: ContentLengthMismatch
5: UnknownLength
6: BlobTooSmall
7: BlobTooLarge
8: Truncate
9: Write
10: Hyper
11: Http
12: BlobUrl
reports:
- report_name: fetch_blob_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: fetch_blob_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 100
step_size: 20
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Is Font Package Check
#
# Triggered each time the font resolver is asked to resolve a package. This
# event logs a 1 and whether the package was a font package or not. We expect
# this to happen rarely, only a few times after certain applications start.
# Perhaps once per hour at most. We expect that only font packages should be
# requested from the font resolver so we should never log a not_font result.
################################################################################
- id: 7
metric_name: is_font_package_check
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: not_font
1: font
reports:
- report_name: is_font_package_check_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: is_font_package_check_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 50
step_size: 1
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Font Manager Load Static Registry
#
# Occurs when the FontPackageManager tries to load a static registry. Logs a 1
# along with the load result. This would only occur once per boot, so about once
# per month.
################################################################################
- id: 8
metric_name: font_manager_load_static_registry
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: Io
2: Parse
3: PkgUrl
reports:
- report_name: is_font_package_check_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: font_manager_load_static_registry_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 20
step_size: 1
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Package Resolver Startup Duration
#
# Tracks the time it takes the package resolver to startup. Events occur
# once per boot.
################################################################################
- id: 9
metric_name: pkg_resolver_startup_duration
metric_type: ELAPSED_TIME
reports:
- report_name: pkg_resolver_startup_duration_stats
id: 1
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 100
step_size: 250
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
aggregation_type: MAX
window_size:
- 1
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Repository Manager Load Static Configs
#
# Occurs when RepositoryManager attempts to load static repo configs. Logs a 1
# along with the load result. Occurs once per boot.
################################################################################
- id: 10
metric_name: repository_manager_load_static_configs
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: Io
2: Parse
3: Overridden
reports:
- report_name: repository_manager_load_static_configs_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: repository_manager_load_static_configs_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 30
step_size: 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
window_size:
- 1
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Repository Manager Load Repository for Channel
#
# Occurs when RepositoryManager tries to find a repo config for a channel. Logs
# a 1 and whether loading the repository was successful or not. Occurs once per
# boot.
################################################################################
- id: 11
metric_name: repository_manager_load_repository_for_channel
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: failure
1: success
reports:
- report_name: repository_manager_load_repository_for_channel_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: repository_manager_load_repository_for_channel_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 30
step_size: 1
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Create TUF Client
#
# Triggers when Repository tries to create a tuf client. Logs a 1 and the status
# of creating the TUF client. This happens once per boot.
################################################################################
- id: 12
metric_name: create_tuf_client
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: BadSignature
2: Encoding
3: ExpiredMetadata
4: IllegalArgument
5: MissingMetadata
6: NoSupportedHashAlgorithm
7: NotFound
8: Opaque
9: Programming
10: TargetUnavaliable
11: UnknownKeyType
12: VerificationFailure
reports:
- report_name: create_tuf_client_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: create_tuf_client_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 30
step_size: 1
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Update TUF Client
#
# Occurs when UpdatingTufClient tries to update. Logs a 1 and the update status.
# If an error occurs it logs the error type. This would happen roughly once per
# month.
################################################################################
- id: 13
metric_name: update_tuf_client
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: BadSignature
2: Encoding
3: ExpiredMetadata
4: IllegalArgument
5: MissingMetadata
6: NoSupportedHashAlgorithm
7: NotFound
8: Opaque
9: Programming
10: TargetUnavaliable
11: UnknownKeyType
12: VerificationFailure
reports:
- report_name: update_tuf_client_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: update_tuf_client_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 20
step_size: 1
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Resolve
#
# Triggers when resolving a package. Logs a 1 and the status of the resolve
# which indicates the error type or if everything was succesful. Event codes for
# each status are positive versions of the execulisively negative error codes
# used in zircon. This would happen basically every time a componet was run or
# in a burst after an OTA. It's not clear how often this would happen but bursts
# of greater than one per second are expected, such as at boot. After that
# running a componet is expected to be much more rare.
################################################################################
- id: 14
metric_name: resolve
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: ZX_OK
1: ZX_ERR_INTERNAL
2: ZX_ERR_NOT_SUPPORTED
3: ZX_ERR_NO_RESOURCES
4: ZX_ERR_NO_MEMORY
6: ZX_ERR_INTERNAL_INTR_RETRY
10: ZX_ERR_INVALID
11: ZX_ERR_BAD_HANDLE
12: ZX_ERR_WRONG_TYPE
13: ZX_ERR_BAD_SYSCALL
14: ZX_ERR_OUT_OF_RANGE
15: ZX_ERR_BUFFER_TOO_SMALL
20: ZX_ERR_BAD_STATE
21: ZX_ERR_TIMED_OUT
22: ZX_ERR_SHOULD_WAIT
23: ZX_ERR_CANCLED
24: ZX_ERR_PEER_CLOSED
25: ZX_ERR_NOT_FOUND
26: ZX_ERR_ALREADY_EXISTS
27: ZX_ERR_ALREADY_BOUND
28: ZX_ERR_UNAVAILABLE
30: ZX_ERR_ACCESS_DENIED
40: ZX_ERR_IO
41: ZX_ERR_IO_REFUSED
42: ZX_ERR_IO_DATA_INTEGRITY
43: ZX_ERR_IO_DATA_LOSS
44: ZX_ERR_IO_NOT_PRESENT
45: ZX_ERR_IO_OVERRUN
46: ZX_ERR_IO_MISSED_DEADLINE
47: ZX_ERR_IO_INVALID
50: ZX_ERR_BAD_PATH
51: ZX_ERR_NOT_DIR
52: ZX_ERR_NOT_FILE
53: ZX_ERR_FILE_BIG
54: ZX_ERR_NO_SPACE
55: ZX_ERR_NOT_EMPTY
60: ZX_ERR_STOP
61: ZX_ERR_NEXT
62: ZX_ERR_ASYNC
70: ZX_ERR_PROTOCOL_NOT_SUPPORTED
71: ZX_ERR_ADDRESS_UNREACHABLE
72: ZX_ERR_ADDRESS_IN_USE
73: ZX_ERR_NOT_CONNECTED
74: ZX_ERR_CONNECTION_REFUSED
75: ZX_ERR_CONNECTION_RESET
76: ZX_ERR_CONNECTION_ABORTED
- dimension: resolver_type
event_codes:
0: font
1: regular
reports:
- report_name: resolve_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: resolve_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 1000
step_size: 100
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Resolve Duration
#
# Occurs after a package has finished resolving, successful or otherwise. Tracks
# how long it takes to resolve a package. This is expected to take under a few
# seconds. This event occurs in bursts during boot or after OTA and then rarely
# after that. Bursts of greater than one per second are expected.
################################################################################
- id: 15
metric_name: resolve_duration
metric_type: ELAPSED_TIME
metric_dimensions:
- dimension: result
event_codes:
0: failure
1: success
- dimension: resolver_type
event_codes:
0: font
1: regular
reports:
- report_name: resolve_duration_stats
id: 1
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 600
step_size: 1000
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
aggregation_type: MAX
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"
################################################################################
# Package Cache Open
#
# Occurs whenever a blob is opened in pkg-cache. Logs a 1 and the open status.
# If an error does occur it gives the error type. It's expected to occur in
# bursts during boot at greater than one per second but then become rare after
# that.
################################################################################
- id: 16
metric_name: pkg_cache_open
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: result
event_codes:
0: success
1: NotFound
2: Io
reports:
- report_name: pkg_cache_open_stats
id: 1
report_type: PER_DEVICE_NUMERIC_STATS
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: pkg_cache_open_hist
id: 2
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 300
step_size: 10
window_size:
- 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/03/18"