// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_ #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_ #include "build/build_config.h" #include "components/policy/policy_export.h" namespace policy { // Metrics collected for enterprise events. // Events related to device enrollment. // This enum is used to define the buckets for an enumerated UMA histogram with // the name of EnterpriseEnrollmentType. // Hence, // (a) existing enumerated constants should never be deleted or reordered, and // (b) new constants should only be appended at the end of the enumeration // (update tools/metrics/histograms/enums.xml as well). enum MetricEnrollment { … }; // Events related to policy refresh. // This enum is used to define the buckets for an enumerated UMA histogram. // Hence, // (a) existing enumerated constants should never be deleted or reordered, and // (b) new constants should only be appended at the end of the enumeration // (update tools/metrics/histograms/enums.xml as well). enum MetricPolicyRefresh { … }; // Types of policy invalidations. // This enum is used to define the buckets for an enumerated UMA histogram. // Hence, // (a) existing enumerated constants should never be deleted or reordered, and // (b) new constants should only be appended at the end of the enumeration // (update tools/metrics/histograms/enums.xml as well). enum PolicyInvalidationType { … }; // Result of the Device ID field validation in policy protobufs. // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class PolicyDeviceIdValidity { … }; // Names for the UMA counters. They are shared from here since the events // from the same enum above can be triggered in different files, and must use // the same UMA histogram name. // Metrics name from UMA dashboard cloud be used in codesearch as is, so please // keep the names without format specifiers (e.g. %s) or add a comment how the // name could be expanded. inline constexpr char kMetricUserPolicyRefresh[] = …; inline constexpr char kMetricUserPolicyInvalidations[] = …; inline constexpr char kMetricDevicePolicyRefresh[] = …; inline constexpr char kMetricDevicePolicyInvalidations[] = …; inline constexpr char kMetricDeviceLocalAccountPolicyRefresh[] = …; inline constexpr char kMetricDeviceLocalAccountPolicyInvalidations[] = …; inline constexpr char kMetricCBCMPolicyRefresh[] = …; inline constexpr char kMetricCBCMPolicyInvalidations[] = …; inline constexpr char kMetricUserRemoteCommandInvalidations[] = …; inline constexpr char kMetricDeviceRemoteCommandInvalidations[] = …; inline constexpr char kMetricCBCMRemoteCommandInvalidations[] = …; inline constexpr char kMetricUserRemoteCommandReceived[] = …; // Expands to: // Enterprise.UserRemoteCommand.Executed.CommandEchoTest // Enterprise.UserRemoteCommand.Executed.DeviceReboot // Enterprise.UserRemoteCommand.Executed.DeviceScreenshot // Enterprise.UserRemoteCommand.Executed.DeviceSetVolume // Enterprise.UserRemoteCommand.Executed.DeviceStartCrdSession // Enterprise.UserRemoteCommand.Executed.DeviceFetchStatus // Enterprise.UserRemoteCommand.Executed.UserArcCommand // Enterprise.UserRemoteCommand.Executed.DeviceWipeUsers // Enterprise.UserRemoteCommand.Executed.DeviceRefreshEnterpriseMachineCertificate // Enterprise.UserRemoteCommand.Executed.DeviceRemotePowerwash // Enterprise.UserRemoteCommand.Executed.DeviceGetAvailableDiagnosticRoutines // Enterprise.UserRemoteCommand.Executed.DeviceRunDiagnosticRoutine // Enterprise.UserRemoteCommand.Executed.DeviceGetDiagnosticRoutineUpdate // Enterprise.UserRemoteCommand.Executed.BrowserClearBrowsingData // Enterprise.UserRemoteCommand.Executed.DeviceResetEuicc // Enterprise.UserRemoteCommand.Executed.BrowserRotateAttestationCredential // Enterprise.UserRemoteCommand.Executed.FetchCrdAvailabilityInfo // Enterprise.UserRemoteCommand.Executed.FetchSupportPacket inline constexpr char kMetricUserRemoteCommandExecutedTemplate[] = …; inline constexpr char kMetricDeviceRemoteCommandReceived[] = …; // Expands To: // Enterprise.DeviceRemoteCommand.Crd.Unknown.UnknownUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.AutoLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.ManuallyLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.AffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.UnaffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.ManagedGuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.GuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.Unknown.NoUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.UnknownUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.AutoLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.ManuallyLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.AffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.UnaffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.ManagedGuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.GuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.NoUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.UnknownUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.AutoLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.ManuallyLaunchedKioskSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.AffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.UnaffiliatedUserSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.ManagedGuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.GuestSession.Result // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.NoUserSession.Result inline constexpr char kMetricDeviceRemoteCommandCrdResultTemplate[] = …; // ExpandsTo: // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.UnknownUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.AutoLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.ManuallyLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.AffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.UnaffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.ManagedGuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.GuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteAccess.NoUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.UnknownUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.AutoLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.ManuallyLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.AffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.UnaffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.ManagedGuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.GuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.RemoteSupport.NoUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.UnknownUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.AutoLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.ManuallyLaunchedKioskSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.AffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.UnaffiliatedUserSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.ManagedGuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.GuestSession.SessionDuration // Enterprise.DeviceRemoteCommand.Crd.Unknown.NoUserSession.SessionDuration inline constexpr char kMetricDeviceRemoteCommandCrdSessionDurationTemplate[] = …; // Expands to: // Enterprise.DeviceRemoteCommand.Executed.CommandEchoTest // Enterprise.DeviceRemoteCommand.Executed.DeviceReboot // Enterprise.DeviceRemoteCommand.Executed.DeviceScreenshot // Enterprise.DeviceRemoteCommand.Executed.DeviceSetVolume // Enterprise.DeviceRemoteCommand.Executed.DeviceStartCrdSession // Enterprise.DeviceRemoteCommand.Executed.DeviceFetchStatus // Enterprise.DeviceRemoteCommand.Executed.UserArcCommand // Enterprise.DeviceRemoteCommand.Executed.DeviceWipeUsers // Enterprise.DeviceRemoteCommand.Executed.DeviceRefreshEnterpriseMachineCertificate // Enterprise.DeviceRemoteCommand.Executed.DeviceRemotePowerwash // Enterprise.DeviceRemoteCommand.Executed.DeviceGetAvailableDiagnosticRoutines // Enterprise.DeviceRemoteCommand.Executed.DeviceRunDiagnosticRoutine // Enterprise.DeviceRemoteCommand.Executed.DeviceGetDiagnosticRoutineUpdate // Enterprise.DeviceRemoteCommand.Executed.BrowserClearBrowsingData // Enterprise.DeviceRemoteCommand.Executed.DeviceResetEuicc // Enterprise.DeviceRemoteCommand.Executed.BrowserRotateAttestationCredential // Enterprise.DeviceRemoteCommand.Executed.FetchCrdAvailabilityInfo inline constexpr char kMetricDeviceRemoteCommandExecutedTemplate[] = …; inline constexpr char kMetricCBCMRemoteCommandReceived[] = …; // Expands to: // Enterprise.CBCMRemoteCommand.Executed.CommandEchoTest // Enterprise.CBCMRemoteCommand.Executed.DeviceReboot // Enterprise.CBCMRemoteCommand.Executed.DeviceScreenshot // Enterprise.CBCMRemoteCommand.Executed.DeviceSetVolume // Enterprise.CBCMRemoteCommand.Executed.DeviceStartCrdSession // Enterprise.CBCMRemoteCommand.Executed.DeviceFetchStatus // Enterprise.CBCMRemoteCommand.Executed.UserArcCommand // Enterprise.CBCMRemoteCommand.Executed.DeviceWipeUsers // Enterprise.CBCMRemoteCommand.Executed.DeviceRefreshEnterpriseMachineCertificate // Enterprise.CBCMRemoteCommand.Executed.DeviceRemotePowerwash // Enterprise.CBCMRemoteCommand.Executed.DeviceGetAvailableDiagnosticRoutines // Enterprise.CBCMRemoteCommand.Executed.DeviceRunDiagnosticRoutine // Enterprise.CBCMRemoteCommand.Executed.DeviceGetDiagnosticRoutineUpdate // Enterprise.CBCMRemoteCommand.Executed.BrowserClearBrowsingData // Enterprise.CBCMRemoteCommand.Executed.DeviceResetEuicc // Enterprise.CBCMRemoteCommand.Executed.BrowserRotateAttestationCredential // Enterprise.CBCMRemoteCommand.Executed.FetchCrdAvailabilityInfo inline constexpr char kMetricCBCMRemoteCommandExecutedTemplate[] = …; // Private set membership UMA histogram names. inline constexpr char kUMAPsmSuccessTime[] = …; inline constexpr char kUMAPsmResult[] = …; inline constexpr char kUMAPsmNetworkErrorCode[] = …; inline constexpr char kUMAPsmDmServerRequestStatus[] = …; // DeviceAutoEnrollmentRequest i.e. hash dance request UMA histogram names. inline constexpr char kUMAHashDanceSuccessTime[] = …; // The following histogram names where added before PSM (private set membership) // existed. They are only recorded for hash dance. inline constexpr char kUMAHashDanceProtocolTime[] = …; inline constexpr char kUMAHashDanceBucketDownloadTime[] = …; inline constexpr char kUMAHashDanceRequestStatus[] = …; inline constexpr char kUMAHashDanceNetworkErrorCode[] = …; // The following UMA suffixes are used by Hash dance and PSM protocols. // Suffix for initial enrollment. inline constexpr char kUMASuffixInitialEnrollment[] = …; // Suffix for Forced Re-Enrollment. inline constexpr char kUMASuffixFRE[] = …; // Histograms for the unified state determination. inline constexpr char kUMAStateDeterminationDeviceIdentifierStatus[] = …; inline constexpr char kUMAStateDeterminationEnabled[] = …; inline constexpr char kUMAStateDeterminationEmbargoDatePassed[] = …; inline constexpr char kUMAStateDeterminationKillSwitchFetchNetworkErrorCode[] = …; inline constexpr char kUMAStateDeterminationKillSwitchFetchNumTries[] = …; inline constexpr char kUMAStateDeterminationOnFlex[] = …; inline constexpr char kUMAStateDeterminationOwnershipStatus[] = …; inline constexpr char kUMAStateDeterminationPsmReportedAvailableState[] = …; inline constexpr char kUMAStateDeterminationPsmRlweOprfRequestDmStatusCode[] = …; inline constexpr char kUMAStateDeterminationPsmRlweOprfRequestNetworkErrorCode[] = …; inline constexpr char kUMAStateDeterminationPsmRlweQueryRequestDmStatusCode[] = …; inline constexpr char kUMAStateDeterminationPsmRlweQueryRequestNetworkErrorCode[] = …; inline constexpr char kUMAStateDeterminationStateKeysRetrievalErrorType[] = …; inline constexpr char kUMAStateDeterminationStateRequestDmStatusCode[] = …; inline constexpr char kUMAStateDeterminationStateRequestNetworkErrorCode[] = …; inline constexpr char kUMAStateDeterminationStateReturned[] = …; inline constexpr char kUMAStateDeterminationStepDuration[] = …; inline constexpr char kUMAStateDeterminationSystemClockSynchronized[] = …; inline constexpr char kUMAStateDeterminationTotalDurationByState[] = …; inline constexpr char kUMAStateDeterminationTotalDuration[] = …; inline constexpr char kUMAStateDeterminationStatus[] = …; inline constexpr char kUMAStateDeterminationIsInitialByState[] = …; inline constexpr char kUMAPrefixEnrollmentTokenBasedOOBEConfig[] = …; // Suffixes added to kUMAStateDeterminationTotalDurationByState. inline constexpr char kUMASuffixConnectionError[] = …; inline constexpr char kUMASuffixStateKeysRetrievalError[] = …; inline constexpr char kUMASuffixDisabled[] = …; inline constexpr char kUMASuffixEnrollment[] = …; inline constexpr char kUMASuffixNoEnrollment[] = …; inline constexpr char kUMASuffixServerError[] = …; // Suffixes added to kUMAStateDeterminationStepDuration. inline constexpr char kUMASuffixOPRFRequest[] = …; inline constexpr char kUMASuffixOwnershipCheck[] = …; inline constexpr char kUMASuffixQueryRequest[] = …; inline constexpr char kUMASuffixStateKeysRetrieval[] = …; inline constexpr char kUMASuffixStateRequest[] = …; inline constexpr char kUMASuffixSystemClockSync[] = …; } // namespace policy #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_