blob: 4bc87ee3a488364397369fef83c942b65d6e2600 [file]
# Copyright 2021 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: setui
################################################################################
metric_definitions:
#####################################################################
# Next Metric ID: 11
#####################################################################
#####################################################################
# write_failures
#
# Records the number of times a particular setting fails to be
# written to disk on a given device in a particular day. A new event
# will be logged every hour via a Sampler config if there is any new
# failure in that hour.
#####################################################################
- id: 1
metric_name: write_failures
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: setting
event_codes: &settings
0: Unknown
1: Accessibility
2: Audio
3: AudioPolicy
4: Display
5: DoNotDisturb
6: FactoryReset
7: Input
8: Intl
9: Light
10: NightMode
11: Privacy
12: Setup
13: Keyboard
14: LightSensor
reports:
#####################################################################
# per_device_counts
#
# Gives a histogram of the number of failures per device, up to 10
# failures and then one more 10+ failures bucket. This can be used
# to get the number of devices with at least one failure in addition
# to the distribution of failures per device.
#####################################################################
- report_name: per_device_counts
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
# TODO(fxbug.dev/87403): switch to REPORT_ALL once available.
system_profile_selection: SELECT_LAST
local_aggregation_period: WINDOW_1_DAY
int_buckets:
linear:
floor: 1
num_buckets: 10 # past 10 failures a day, it will just be the overflow bucket.
step_size: 1
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2023/10/31"
#####################################################################
# request_responses
#
# Records the number of times a particular response type is given
# as a reply to a request to the setui service on a given device in
# a particular day. A new event will be logged every hour via a
# Sampler config if there are any new responses in that hour.
#####################################################################
- id: 2
metric_name: request_responses
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: setting
event_codes: *settings
- dimension: response_type
event_codes:
0: Unknown
1: OkSome
2: OkNone
3: UnimplementedRequest
4: StorageFailure
5: InitFailure
6: RestoreFailure
7: InvalidArgument
8: IncompatibleArguments
9: ExternalFailure
10: UnhandledType
11: DeliveryError
12: UnexpectedError
13: UndeliverableError
14: UnsupportedError
15: CommunicationError
16: IrrecoverableError
17: TimeoutError
reports:
#####################################################################
# per_device_counts
#
# Gives a histogram of the number of failures per device. The buckets
# increase exponentially in size by powers of 2, up to 10 buckets.
# This helps determine the frequency of types of responses.
#####################################################################
- report_name: per_device_counts
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: REPORT_ALL
local_aggregation_period: WINDOW_1_DAY
int_buckets:
exponential:
floor: 0
initial_step: 1
# past 1 + 2 ^ 10 = 1025 responses, it will be in the overflow bucket.
num_buckets: 10
# The power to which the step increases by.
step_multiplier: 2
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2024/08/14"
######################################################################
# active_listeners
#
# Records statistics about the number of active listeners that exist
# on the settings service, broken down by setting type
######################################################################
- id: 3
metric_name: active_listeners
metric_type: INTEGER
metric_semantics: [USAGE_COUNTING]
metric_units_other: LISTENERS
metric_dimensions:
- dimension: setting
event_codes: *settings
reports:
#####################################################################
# max_listeners_day
#
# Gives the max number of listeners encountered over the daily window
# per setting type
#####################################################################
- report_name: max_listeners_day
id: 1
report_type: UNIQUE_DEVICE_NUMERIC_STATS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
local_aggregation_procedure: MAX_PROCEDURE
local_aggregation_period: WINDOW_1_DAY
meta_data:
max_release_stage: GA
expiration_date: "2024/08/14"
#####################################################################
# active_migrations
#
# Records the final migration number after a device updates its
# settings service storage. This value is logged at most once per
# boot.
#
# Note: Keep the migration ids in order in the future. Do not reorder
# any that are currently out of order.
#####################################################################
- id: 4
metric_name: active_migrations
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: migration_id
event_codes:
0: Unknown
1: Stash # Unmigrated devices
2: V_1653667208 # Light stash migration
3: V_1653667210 # Light stash removal
4: V_1668816708 # Audio stash migration
5: V_1668816715 # Audio stash removal
6: V_1668815248 # FDR stash migration
7: V_1668815249 # FDR stash removal
8: V_1669065681 # Keyboard stash migration
9: V_1669065684 # Keyboard stash removal
10: V_1669143232 # Display stash migration
11: V_1669143270 # Display stash removal
12: V_1669222938 # Setup stash migration
13: V_1669222939 # Setup stash removal
reports:
#####################################################################
# unique_devices
#
# Gives a count of the number of devices on each particular
# migration. Only devices running within the last 7 days will be
# tracked.
#####################################################################
- report_name: unique_devices
id: 1
report_type: UNIQUE_DEVICE_COUNTS
system_profile_selection: SELECT_LAST
privacy_level: NO_ADDED_PRIVACY
local_aggregation_procedure: AT_LEAST_ONCE
local_aggregation_period: WINDOW_7_DAYS
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
reporting_threshold: 1
meta_data:
max_release_stage: GA
expiration_date: "2023/05/17"
#####################################################################
# active_migrations
#
# Records the final migration error after a device fails to updates
# its settings service storage. This value is logged at most once per
# boot.
#####################################################################
- id: 5
metric_name: migration_errors
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: error
event_codes:
0: Unknown
1: NoData
2: DiskFull
3: Unrecoverable
reports:
#####################################################################
# error_counts
#
# Gives a count of the number of errors being seen when attempting
# migrations. This will give us an idea of how common the errors are
# across the field.
#####################################################################
- report_name: error_counts
id: 1
report_type: FLEETWIDE_OCCURRENCE_COUNTS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
#####################################################################
# unique_error
#
# Gives a count of the number of devices experiencing migration
# errors over a 7 day rolling window.
#####################################################################
- report_name: unique_devices
id: 2
report_type: UNIQUE_DEVICE_COUNTS
system_profile_selection: SELECT_LAST
privacy_level: NO_ADDED_PRIVACY
local_aggregation_procedure: AT_LEAST_ONCE
local_aggregation_period: WINDOW_7_DAYS
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2023/05/17"
#####################################################################
# external_apis
#
# Records the calls to and from external apis, and the counts of each
# type of different external api event.
#####################################################################
- id: 8
metric_name: external_apis
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: protocol
event_codes:
0: Unknown
1: InputReportsReader
2: Light
3: InputDevice
4: AudioCore
5: Discovery
6: Device
7: DeviceListenerRegistry
- dimension: external_api_event
event_codes:
0: Unknown
1: ApiCall
2: ApiError
3: ApiResponse
4: Closed
5: Created
reports:
#####################################################################
# requests_per_protocol
#
# Histogram of the number of devices that saw each bucket's
# associated event type count per protocol over the daily window.
#####################################################################
- report_name: requests_per_protocol
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: REPORT_ALL
local_aggregation_period: WINDOW_1_DAY
privacy_level: NO_ADDED_PRIVACY
int_buckets:
exponential:
floor: 0
initial_step: 1
# past 1 + 4 ^ 8 = 65537 responses, it will be in the overflow bucket.
num_buckets: 8
# The power to which the step increases by.
step_multiplier: 4
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2024/08/16"
#####################################################################
# api_usage_counts
#
# Records the number of times a particular settings API is used.
#####################################################################
- id: 10
metric_name: api_usage_counts
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions:
- dimension: setting
event_codes: *settings
- dimension: request
event_codes: &request
0: Unknown
1: Get
2: Listen
3: Set
4: Restore
reports:
#####################################################################
# counts_per_protocol
#
# Histogram of the number of devices that saw each bucket's
# associated event type count per protocol over the daily window.
#####################################################################
- report_name: counts_per_protocol
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: REPORT_ALL
local_aggregation_period: WINDOW_1_DAY
privacy_level: NO_ADDED_PRIVACY
int_buckets:
exponential:
floor: 0
initial_step: 1
# past 1 + 2 ^ 14 = 16385 responses, it will be in the overflow bucket.
num_buckets: 14
# The power to which the step increases by.
step_multiplier: 2
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2024/08/22"
# Deleted metric IDs that must not be reused.
deleted_metric_ids: [6,7,9]