blob: ccc07462689394e57a25e37402ba30f0cb1f30fe [file] [log] [blame]
# Copyright 2018 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.
metric_definitions:
#####################################################################
# per_device_bytes_uploaded
#
# This metric will be used to generate a report that gives statistics about the
# daily total number of bytes uploaded from each device.
# Each time UploadEvents() is called by the ClearcutUploader, an event
# recording the HTTP request's body size will be logged with status |Attempted|.
# If the observation is sent successfully, another event with the HTTP request's
# body size will be logged with status |Succeeded|.
#####################################################################
- id: 3
no_replacement_metric: This metric is manually migrated with metric 12
metric_name: "per_device_bytes_uploaded"
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: status
event_codes: &upload_status
1: Attempted
2: Succeeded
reports:
- report_name: "per_device_bytes_uploaded_histogram"
id: 3585902129 # legacy long report_id
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 100000 # 100KB
num_buckets: 1000 # max: 100MB
window_size: [1]
aggregation_type: SUM
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 12
metric_name: "bytes_uploaded"
metric_type: OCCURRENCE
metric_semantics: [NETWORK_COMMUNICATION]
metric_dimensions:
- dimension: status
event_codes: *upload_status
reports:
- report_name: "bytes_uploaded_per_device_histogram"
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: SELECT_LAST
privacy_level: NO_ADDED_PRIVACY
int_buckets:
linear:
floor: 0
step_size: 100000 # 100KB
num_buckets: 1000 # max: 100MB
local_aggregation_period: 1
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2021/11/16"
####################################################################
# per_project_bytes_stored
#
# This metric will be used to measure per-device, daily, number of bytes added
# to the ObservationStore, broken down by project. Each time the
# ObservationStore is called with AddEncryptedObservation(), an event will be
# logged with status |Attempted|. If the observation is successfully stored,
# another event will be logged with status |Succeeded|. All invocations will use
# a component string with value <customer_name>/<project_name>.
#####################################################################
- id: 4
no_replacement_metric: >
TODO(fxbug.dev/64989): This metric will be manually migrated
to use metric_dimensions instead of component strings.
metric_name: "per_project_bytes_stored"
metric_type: MEMORY_USAGE
metric_dimensions:
- dimension: status
event_codes:
1: Attempted
2: Succeeded
reports:
- report_name: "per_project_bytes_stored_histogram"
id: 66121589 # legacy long report_id
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 100000 # 100KB
num_buckets: 1000 # max: 100MB
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# per_project_logger_calls_made
#
# This metric will be used to measure per-device, per-project, daily number of
# Logger method calls made. Each time a method from the logger interface is
# called, an event will be logged with the respective logger_method value
# and <customer_name>/<project_name> as a component string.
#####################################################################
- id: 5
metric_name: "per_project_logger_calls_made"
metric_type: EVENT_COUNT
no_replacement_metric: >
TODO(fxbug.dev/64989): This metric will be manually migrated
to use metric_dimensions instead of component strings.
metric_dimensions:
- dimension: logger_method
event_codes: &cobalt_logger_method_list
0: Unknown
# Old logger methods for Cobalt 1.0.
1: LogEvent
2: LogEventCount
3: LogElapsedTime
4: LogFrameRate
5: LogMemoryUsage
6: LogIntHistogram
199: LogCobaltEvents
# New Logger methods for the new Cobalt 1.1.
9: LogOccurrence
10: LogInteger
11: LogIntegerHistogram
7: LogString
8: LogCustomEvent
12: LogSerializedCustomEvent
198: LogMetricEvents
max_event_code: 200
reports:
- report_name: per_project_logger_calls_made_histogram
id: 442710744 # legacy long report_id
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
num_buckets: 1000
step_size: 50
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# inaccurate_clock_events_cached
#
# This metric will be used to measure per-device, per-project, daily number of
# UndatedEventManager::Save method calls made. Each time an event is saved,
# an event will be logged with the <customer_name>/<project_name> as a
# component string.
#####################################################################
- id: 6
metric_name: "inaccurate_clock_events_cached"
metric_type: EVENT_COUNT
no_replacement_metric: TODO(fxbug.dev/64989) Update logging sites to log to metric 106
reports:
- report_name: inaccurate_clock_events_cached_count
id: 1576071636 # legacy long report_id
report_type: EVENT_COMPONENT_OCCURRENCE_COUNT
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: inaccurate_clock_events_cached_per_device_count
id: 2798016925 # legacy long report_id
report_type: PER_DEVICE_NUMERIC_STATS
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 106
metric_name: inaccurate_clock_events_cached_migrated
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
reports:
- report_name: occurrence_counts
id: 1
report_type: FLEETWIDE_OCCURRENCE_COUNTS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: per_device_numeric_stats
id: 2
report_type: UNIQUE_DEVICE_NUMERIC_STATS
privacy_level: NO_ADDED_PRIVACY
local_aggregation_period: WINDOW_1_DAY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# inaccurate_clock_events_dropped
#
# This metric will be used to measure per-device, per-project, daily number of
# saved UndatedEventManager events that had to be dropped due to size
# constraints. Each time an event is dropped, an event will be logged with the
# <customer_name>/<project_name> as a component string.
#####################################################################
- id: 7
metric_name: "inaccurate_clock_events_dropped"
metric_type: EVENT_COUNT
no_replacement_metric: TODO(fxbug.dev/64989) Update logging sites to log to metric 107
reports:
- report_name: inaccurate_clock_events_dropped_count
id: 4212632604 # legacy long report_id
report_type: EVENT_COMPONENT_OCCURRENCE_COUNT
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: inaccurate_clock_events_dropped_per_device_count
id: 911321925 # legacy long report_id
report_type: PER_DEVICE_NUMERIC_STATS
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 107
metric_name: inaccurate_clock_events_dropped_migrated
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
reports:
- report_name: occurrence_counts
id: 1
report_type: FLEETWIDE_OCCURRENCE_COUNTS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: per_device_numeric_stats
id: 2
report_type: UNIQUE_DEVICE_NUMERIC_STATS
privacy_level: NO_ADDED_PRIVACY
local_aggregation_period: WINDOW_1_DAY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# per_project_bytes_uploaded
#
# This metric will be used to generate a report that gives statistics about the
# daily total number of bytes uploaded from each project on a device.
# Each time SendEnvelopeToBackend() is called by the ShippingManager, an event
# recording the size of the ObservationBatch proto will be logged with status
# |Attempted| for each project in the Envelope. The component string of the
# event will be <customer_name>/<project_name>.
# If the envelope was sent successfully, another event will be logged for each
# project in the Envelope recording the size of the ObservationBatch proto and
# status |Succeeded| . The component string of the event will be
# <customer_name>/<project_name>.
#####################################################################
- id: 8
no_replacement_metric: >
TODO(fxbug.dev/64989): This metric will be manually migrated to
use metric_dimensions instead of component strings.
metric_name: "per_project_bytes_uploaded"
metric_type: EVENT_COUNT
metric_dimensions:
- dimension: status
event_codes:
1: Attempted
2: Succeeded
reports:
- report_name: "per_project_bytes_uploaded_histogram_0_5_20"
id: 726514302 # legacy long report_id
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 5000000 # 5MB
num_buckets: 20 # max: 100MB
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: "per_project_bytes_uploaded_histogram_0_500_20"
id: 4265629286 # legacy long report_id
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 500000 # 500KB
num_buckets: 20 # max: 10MB
window_size: [1]
aggregation_type: SUM
candidate_file: cobalt_internal/metrics/project_list.txt
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# logger_calls_made
#
# This metric will be used to count how much each type of event is logged on a device per day. Each
# time a method from the logger interface is called, an event will be logged with the respective
# logger_method value and a count of 1.
#####################################################################
- id: 9
replacement_metric_id: 109
metric_name: "logger_calls_made"
metric_type: EVENT_COUNT
metric_dimensions: &lcm_dimensions
- dimension: logger_method
event_codes: *cobalt_logger_method_list
reports:
- report_name: "per_device_logger_calls_histogram"
id: 1
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 2000 # 2K
num_buckets: 20 # max: 40K
window_size: [1]
aggregation_type: SUM
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 109
metric_name: logger_calls_made_migrated
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions: *lcm_dimensions
reports:
- report_name: histogram
id: 1
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: SELECT_LAST
privacy_level: NO_ADDED_PRIVACY
int_buckets:
linear:
floor: 0
step_size: 2000 # 2K
num_buckets: 20 # max: 40K
local_aggregation_period: WINDOW_1_DAY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- report_name: unique_device_count
id: 2
report_type: UNIQUE_DEVICE_COUNTS
system_profile_selection: SELECT_LAST
local_aggregation_period: WINDOW_1_DAY
local_aggregation_procedure: AT_LEAST_ONCE
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [OS]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# 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
replacement_metric_id: 110
metric_name: "set_software_distribution_info_called"
metric_type: EVENT_COUNT
metric_dimensions: &ssdic_dimensions
- dimension: new_channel
event_codes:
0: Unset
1: Unknown
2: Valid
- dimension: previous_channel
event_codes:
0: Unset # SetSoftwareDistributionInfo was not called before.
1: Unknown # SetSoftwareDistributionInfo called with null channel.
2: Valid # SetSoftwareDistributionInfo called with channel string.
- dimension: new_realm
event_codes:
0: Unset
1: Unknown
2: Valid
- dimension: previous_realm
event_codes:
0: Unset # SetSoftwareDistributionInfo was not called before.
1: Unknown # SetSoftwareDistributionInfo called with null realm.
2: 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]
- report_name: "set_software_distribution_info_called_histogram"
id: 3
report_type: PER_DEVICE_HISTOGRAM
int_buckets:
linear:
floor: 0
step_size: 5
num_buckets: 25
window_size: [1]
aggregation_type: SUM
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 110
metric_name: set_software_distribution_info_called_migrated
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions: *ssdic_dimensions
reports:
- report_name: stats_per_device_realm
id: 1
report_type: UNIQUE_DEVICE_NUMERIC_STATS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [PRODUCT_NAME, REALM]
local_aggregation_period: WINDOW_1_DAY
- report_name: stats_per_device_channel
id: 2
report_type: UNIQUE_DEVICE_NUMERIC_STATS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [PRODUCT_NAME, CHANNEL]
local_aggregation_period: WINDOW_1_DAY
- report_name: histogram
id: 3
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: SELECT_LAST
privacy_level: NO_ADDED_PRIVACY
int_buckets:
linear:
floor: 0
step_size: 5
num_buckets: 25
local_aggregation_period: WINDOW_1_DAY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
#####################################################################
# idle_observation_upload
#
# Whenever Cobalt performs an upload we log "1" along with event
# codes representing the current upload_strategy and device state.
#####################################################################
- id: 11
replacement_metric_id: 111
metric_name: "idle_observation_upload"
metric_type: EVENT_COUNT
metric_dimensions: &iou_dimensions
- dimension: device_state
event_codes:
0: Unreported # Device state not requested
1: Active
2: Idle
3: Unknown # Device state requested unsuccessfully
reports:
- report_name: "idle_observation_upload_per_device"
id: 1
report_type: NUMERIC_AGGREGATION
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
- id: 111
metric_name: idle_observation_upload_migrated
metric_type: OCCURRENCE
metric_semantics: [USAGE_COUNTING]
metric_dimensions: *iou_dimensions
reports:
- report_name: occurrence_counts
id: 1
report_type: FLEETWIDE_OCCURRENCE_COUNTS
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/05/06"
############################################################################
# store_usage
#
# Whenever Cobalt writes data to disk, we log the estimated number of bytes
# stored for that class.
############################################################################
- id: 13
metric_name: store_usage
metric_type: INTEGER
metric_units: BYTES
metric_semantics: [DATA_SIZE]
metric_dimensions: &disk_usage_dimensions
- dimension: storage_class
event_codes:
1: ObservationStore
2: LocalAggregateStorage
3: AggregateStore
4: ObservationHistory
reports:
- id: 1
report_name: per_device_max
report_type: UNIQUE_DEVICE_NUMERIC_STATS
local_aggregation_period: WINDOW_1_DAY
local_aggregation_procedure: MAX_PROCEDURE
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- id: 2
report_name: per_device_histogram
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: SELECT_LAST
int_buckets:
# Powers of 2 from 2^0 -> 2^21
exponential:
floor: 0
num_buckets: 23
initial_step: 2
step_multiplier: 2
privacy_level: NO_ADDED_PRIVACY
local_aggregation_period: WINDOW_1_DAY
local_aggregation_procedure: MAX_PROCEDURE
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/03/09"
############################################################################
# store_fullness
#
# Whenever Cobalt writes data to disk, we log the estimated fullness of that
# store in per mille. If the store does not have a max size set, this metric
# will not be logged.
############################################################################
- id: 14
metric_name: store_fullness
metric_type: INTEGER
metric_units_other: "per mille"
metric_semantics: [DATA_SIZE]
metric_dimensions: *disk_usage_dimensions
reports:
- id: 1
report_name: per_device_max
report_type: UNIQUE_DEVICE_NUMERIC_STATS
local_aggregation_period: WINDOW_1_DAY
local_aggregation_procedure: MAX_PROCEDURE
privacy_level: NO_ADDED_PRIVACY
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
- id: 2
report_name: per_device_histogram
report_type: UNIQUE_DEVICE_HISTOGRAMS
system_profile_selection: SELECT_LAST
int_buckets:
linear:
floor: 0
num_buckets: 1000
step_size: 1
privacy_level: NO_ADDED_PRIVACY
local_aggregation_period: WINDOW_1_DAY
local_aggregation_procedure: MAX_PROCEDURE
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
expiration_date: "2022/03/09"