Add metrics for BPF shim initialization error
```
statsd_testdrive 979
metric_id: 1111
event_metrics {
data {
aggregated_atom_info {
atom {
979: {
1: 15
}
}
elapsed_timestamp_nanos: 66003587918
elapsed_timestamp_nanos: 66004273970
elapsed_timestamp_nanos: 72331748965
elapsed_timestamp_nanos: 72332440169
elapsed_timestamp_nanos: 77164965823
elapsed_timestamp_nanos: 77165560176
}
}
}
is_active: true
estimated_data_bytes: 60
```
Flag: EXEMPT mainline
Bug: 430428550
Test: statsd_testdrive
Change-Id: I3bc5975545589ab51af5312038830b94251c11ee
This commit is contained in:
parent
82209dc280
commit
95c9e42669
1 changed files with 7 additions and 0 deletions
|
|
@ -501,6 +501,12 @@ public class BpfCoordinator {
|
|||
lastMaxSessionCount);
|
||||
}
|
||||
|
||||
/** Send a BpfCoordinatorShimInitError event. */
|
||||
public void sendBpfCoordinatorShimInitError() {
|
||||
ConnectivityStatsLog.write(ConnectivityStatsLog.CORE_NETWORKING_TERRIBLE_ERROR_OCCURRED,
|
||||
ConnectivityStatsLog.CORE_NETWORKING_TERRIBLE_ERROR_OCCURRED__ERROR_TYPE__TYPE_BPF_COORDINATOR_SHIM_INIT_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeviceConfigUtils#isTetheringFeatureEnabled
|
||||
*/
|
||||
|
|
@ -542,6 +548,7 @@ public class BpfCoordinator {
|
|||
mBpfCoordinatorShim = BpfCoordinatorShim.getBpfCoordinatorShim(deps);
|
||||
if (!mBpfCoordinatorShim.isInitialized()) {
|
||||
mLog.e("Bpf shim not initialized");
|
||||
mDeps.sendBpfCoordinatorShimInitError();
|
||||
}
|
||||
|
||||
// BPF IPv4 forwarding only supports on S+.
|
||||
|
|
|
|||
Loading…
Reference in a new issue