Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21a7679c authored by Luke Huang's avatar Luke Huang
Browse files

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 79e5185780a94db0b2356edf987239da459433f4)

Change-Id: I170dda9247e94a17a7cac9e7e414d592bb4dccbf
parent 5d4bfe50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment