Update the default sampling flag of DNS resolver metrics events

The sample rate of DNS resolver metrics events depends on Experiment
flag and default sampling flag. Currently, the sampling experiment
has been completed. Therefore update the new default sampling flag to
reduce the metrics event size.

1. Current default sampling rate:
   DEFAULT_SUBSAMPLING_MAP[] = "default:1 0:100 7:10
   metrics data size: 170k byte per device
2. Old Experiment:
   DEFAULT_SUBSAMPLING_MAP[] = "default:5 0:300 2:80 7:80"
   metrics data size: 11k byte per device
3. New default sampling rate:
   DEFAULT_SUBSAMPLING_MAP[] = "default:8 0:400 2:110 7:110"
   metrics data size: 7.9k byte per device
4. New Experiment:(including the temporary fix of b/185097438)
   DEFAULT_SUBSAMPLING_MAP[] = "default:8 0:400 2:110 4:110 7:110"
   metrics data size: 7.9k byte per device

Because there is already a solution for b/185097438 in the code.
Therefore, what this commit will do is item3 to reduce the size
of the event.

Bug: 184830442
Test: atest resolv_unit_test
Change-Id: I3c0ab4a4504dfd5f8c789348587de33e01951920
2 files changed
tree: 8b01b073db9a5dde36deb15cc0f2d39a76b33895
  1. aidl_api/
  2. apex/
  3. binder/
  4. include/
  5. tests/
  6. .editorconfig
  7. Android.bp
  8. cbindgen.toml
  9. Dns64Configuration.cpp
  10. Dns64Configuration.h
  11. DnsProxyListener.cpp
  12. DnsProxyListener.h
  13. DnsQueryLog.cpp
  14. DnsQueryLog.h
  15. DnsQueryLogTest.cpp
  16. DnsResolver.cpp
  17. DnsResolver.h
  18. DnsResolverService.cpp
  19. DnsResolverService.h
  20. DnsStats.cpp
  21. DnsStats.h
  22. DnsStatsTest.cpp
  23. DnsTlsDispatcher.cpp
  24. DnsTlsDispatcher.h
  25. DnsTlsQueryMap.cpp
  26. DnsTlsQueryMap.h
  27. DnsTlsServer.cpp
  28. DnsTlsServer.h
  29. DnsTlsSessionCache.cpp
  30. DnsTlsSessionCache.h
  31. DnsTlsSocket.cpp
  32. DnsTlsSocket.h
  33. DnsTlsSocketFactory.h
  34. DnsTlsTransport.cpp
  35. DnsTlsTransport.h
  36. doh.h
  37. doh.rs
  38. doh_ffi_test.cpp
  39. Experiments.cpp
  40. Experiments.h
  41. ExperimentsTest.cpp
  42. getaddrinfo.cpp
  43. getaddrinfo.h
  44. gethnamaddr.cpp
  45. gethnamaddr.h
  46. hostent.h
  47. IDnsTlsSocket.h
  48. IDnsTlsSocketFactory.h
  49. IDnsTlsSocketObserver.h
  50. libnetd_resolv.map.txt
  51. LockedQueue.h
  52. NOTICE
  53. OperationLimiter.h
  54. OperationLimiterTest.cpp
  55. OWNERS
  56. params.h
  57. PREUPLOAD.cfg
  58. PrivateDnsCommon.h
  59. PrivateDnsConfiguration.cpp
  60. PrivateDnsConfiguration.h
  61. PrivateDnsConfigurationTest.cpp
  62. PrivateDnsValidationObserver.h
  63. README-DoT.md
  64. README.md
  65. res_cache.cpp
  66. res_comp.cpp
  67. res_comp.h
  68. res_debug.cpp
  69. res_debug.h
  70. res_mkquery.cpp
  71. res_query.cpp
  72. res_send.cpp
  73. res_send.h
  74. res_stats.cpp
  75. resolv_cache.h
  76. resolv_private.h
  77. resolv_test_config_template.xml
  78. ResolverController.cpp
  79. ResolverController.h
  80. ResolverEventReporter.cpp
  81. ResolverEventReporter.h
  82. ResolverStats.h
  83. sethostent.cpp
  84. stats.h
  85. stats.proto
  86. TEST_MAPPING
  87. util.cpp
  88. util.h
README.md

Logging

This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.