1/ Change all "name" to id in statsD.
2/ Handle Subscription for alert.
3/ Support no_report_metric

Bug: 69522276
Test: all statsd unit tests passed.
Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index cb868e1f..45aa192 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -99,10 +99,10 @@
      * count > kDimensionKeySizeSoftLimit.
      *
      * [key]: The config key that this condition belongs to.
-     * [name]: The name of the condition.
+     * [id]: The id of the condition.
      * [size]: The output tuple size.
      */
-    void noteConditionDimensionSize(const ConfigKey& key, const std::string& name, int size);
+    void noteConditionDimensionSize(const ConfigKey& key, const int64_t& id, int size);
 
     /**
      * Report the size of output tuple of a metric.
@@ -111,26 +111,26 @@
      * count > kDimensionKeySizeSoftLimit.
      *
      * [key]: The config key that this metric belongs to.
-     * [name]: The name of the metric.
+     * [id]: The id of the metric.
      * [size]: The output tuple size.
      */
-    void noteMetricDimensionSize(const ConfigKey& key, const std::string& name, int size);
+    void noteMetricDimensionSize(const ConfigKey& key, const int64_t& id, int size);
 
     /**
      * Report a matcher has been matched.
      *
      * [key]: The config key that this matcher belongs to.
-     * [name]: The name of the matcher.
+     * [id]: The id of the matcher.
      */
-    void noteMatcherMatched(const ConfigKey& key, const std::string& name);
+    void noteMatcherMatched(const ConfigKey& key, const int64_t& id);
 
     /**
      * Report that an anomaly detection alert has been declared.
      *
      * [key]: The config key that this alert belongs to.
-     * [name]: The name of the alert.
+     * [id]: The id of the alert.
      */
-    void noteAnomalyDeclared(const ConfigKey& key, const std::string& name);
+    void noteAnomalyDeclared(const ConfigKey& key, const int64_t& id);
 
     /**
      * Report an atom event has been logged.
@@ -187,12 +187,12 @@
     // Stores the number of output tuple of condition trackers when it's bigger than
     // kDimensionKeySizeSoftLimit. When you see the number is kDimensionKeySizeHardLimit +1,
     // it means some data has been dropped.
-    std::map<const ConfigKey, std::map<const std::string, int>> mConditionStats;
+    std::map<const ConfigKey, std::map<const int64_t, int>> mConditionStats;
 
     // Stores the number of output tuple of metric producers when it's bigger than
     // kDimensionKeySizeSoftLimit. When you see the number is kDimensionKeySizeHardLimit +1,
     // it means some data has been dropped.
-    std::map<const ConfigKey, std::map<const std::string, int>> mMetricsStats;
+    std::map<const ConfigKey, std::map<const int64_t, int>> mMetricsStats;
 
     // Stores the number of times a pushed atom is logged.
     // The size of the vector is the largest pushed atom id in atoms.proto + 1. Atoms
@@ -206,10 +206,10 @@
 
     // Stores the number of times an anomaly detection alert has been declared
     // (per config, per alert name).
-    std::map<const ConfigKey, std::map<const std::string, int>> mAlertStats;
+    std::map<const ConfigKey, std::map<const int64_t, int>> mAlertStats;
 
     // Stores how many times a matcher have been matched.
-    std::map<const ConfigKey, std::map<const std::string, int>> mMatcherStats;
+    std::map<const ConfigKey, std::map<const int64_t, int>> mMatcherStats;
 
     void noteConfigRemovedInternalLocked(const ConfigKey& key);