Subsampling DNS events to reduce logs
Currently, each device generates about 4000 queries per day. Reduce the number of events by subsampling events based on how interesting they are: - if return_code == 0 -> log 1 in 100 events (random sampling) - if return_code == EAI_NODATA -> log 1 in 10 events (random sampling) - else -> log 100% Also allow to use experiment flag to update sub-sampling denom. Example for dumpsys dnsresolver: NetId: 100 DnsEvent subsampling map: default:1 0:100 7:10 Bug: 119862317 Test: manual test with using setprop to change subsampling map atest Merged-In: Ibbe3c653bdf45fc03b56a61e3401fad11c05a010 (cherry picked from commit 79e51857) Change-Id: I170dda9247e94a17a7cac9e7e414d592bb4dccbf
Loading