Browse Source

Prepend context in anomaly rate dimension id. (#12342)

FE needs this information when they issue a `/data` request on the
anomaly rates chart. However, this information is only available at
the creation time of the anomaly rate dimension.
vkalintiris 3 years ago
parent
commit
5b8737361a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ml/Dimension.h

+ 3 - 1
ml/Dimension.h

@@ -23,8 +23,10 @@ public:
     unsigned updateEvery() const { return RD->update_every; }
 
     const std::string getID() const {
+        RRDSET *RS = RD->rrdset;
+
         std::stringstream SS;
-        SS << RD->rrdset->id << "|" << RD->name;
+        SS << RS->context << "|" << RS->id << "|" << RD->name;
         return SS.str();
     }