empiredan commented on code in PR #1237:
URL: 
https://github.com/apache/incubator-pegasus/pull/1237#discussion_r1022425323


##########
src/utils/metrics.h:
##########
@@ -405,15 +498,12 @@ class gauge : public metric
     // where "name" is the name of the gauge in string type, and "value" is 
just current value
     // of the gauge fetched by `value()`, in numeric types (i.e. integral or 
floating-point type,
     // determined by `value_type`).
-    void take_snapshot(json::JsonWriter &writer) override
+    void take_snapshot(json::JsonWriter &writer, const metric_filters 
&filters) override
     {
         writer.StartObject();
 
-        writer.Key("name");
-        json::json_encode(writer, prototype()->name().data());
-
-        writer.Key("value");
-        json::json_encode(writer, value());
+        encode_name(writer, filters);

Review Comment:
   Yes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to