blob: 950b1b29cef4f750e09dc1e32f899e0a3818de5b [file] [log] [blame]
Hugo Benichia85c0db2021-11-01 14:20:37 +09001// Copyright 2021 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PATCHPANEL_METRICS_H_
6#define PATCHPANEL_METRICS_H_
7
8namespace patchpanel {
9
10// UMA metrics name for patchpanel Manager Dbus API calls.
11constexpr char kDbusUmaEventMetrics[] = "Network.Patchpanel.Dbus";
Hugo Benichicc7f3272021-10-14 14:59:27 +090012// UMA metrics name for ArcService events.
13constexpr char kArcServiceUmaEventMetrics[] = "Network.Patchpanel.ArcService";
Hugo Benichia85c0db2021-11-01 14:20:37 +090014
15// UMA metrics events for |kDbusUmaEventMetrics|;
16enum class DbusUmaEvent {
17 kUnknown = 0,
18 kArcStartup = 1,
19 kArcStartupSuccess = 2,
20 kArcShutdown = 3,
21 kArcShutdownSuccess = 4,
22 kArcVmStartup = 5,
23 kArcVmStartupSuccess = 6,
24 kArcVmShutdown = 7,
25 kArcVmShutdownSuccess = 8,
26 kTerminaVmStartup = 9,
27 kTerminaVmStartupSuccess = 10,
28 kTerminaVmShutdown = 11,
29 kTerminaVmShutdownSuccess = 12,
30 kPluginVmStartup = 13,
31 kPluginVmStartupSuccess = 14,
32 kPluginVmShutdown = 15,
33 kPluginVmShutdownSuccess = 16,
34 kSetVpnIntent = 17,
35 kSetVpnIntentSuccess = 18,
36 kConnectNamespace = 19,
37 kConnectNamespaceSuccess = 20,
38 kGetTrafficCounters = 21,
39 kGetTrafficCountersSuccess = 22,
40 kModifyPortRule = 23,
41 kModifyPortRuleSuccess = 24,
42 kGetDevices = 25,
43 kGetDevicesSuccess = 26,
44 kSetVpnLockdown = 27,
45 kSetVpnLockdownSuccess = 28,
46 kSetDnsRedirectionRule = 29,
47 kSetDnsRedirectionRuleSuccess = 30,
48
49 kMaxValue,
50};
51
Hugo Benichicc7f3272021-10-14 14:59:27 +090052// UMA metrics events for |kArcServiceUmaEventMetrics|;
53enum class ArcServiceUmaEvent {
54 kUnknown = 0,
55 kStart = 1,
56 kStartSuccess = 2,
57 kStartWithoutStop = 3,
58 kStop = 4,
59 kStopSuccess = 5,
60 kStopBeforeStart = 6,
61 kAddDevice = 7,
62 kAddDeviceSuccess = 8,
63 kSetVethMtuError = 10,
64 kOneTimeContainerSetupError = 11,
65
66 kMaxValue,
67};
68
Hugo Benichia85c0db2021-11-01 14:20:37 +090069} // namespace patchpanel
70
71#endif // PATCHPANEL_METRICS_H_