@@ -17,27 +17,27 @@ class Metric {
1717 // The name of the metric that will be published. A transformation occurs
1818 // based on the name and whether it is "common" or "language-specific" when it
1919 // is recorded.
20- const std::string name_;
20+ std::string name_;
2121 // The type of the metric. This will currently be count or gauge.
22- const std::string type_;
22+ std::string type_;
2323 // Tags associated with this specific instance of the metric.
24- const std::vector<std::string> tags_;
24+ std::vector<std::string> tags_;
2525 // This affects the transformation of the metric name, where it can be a
2626 // common telemetry metric, or a language-specific metric that is prefixed
2727 // with the language name.
2828 bool common_;
2929
3030 protected:
3131 std::atomic<uint64_t > value_ = 0 ;
32- Metric (const std::string name, std::string type,
33- const std::vector<std::string> tags, bool common);
32+ Metric (std::string name, std::string type, std::vector<std::string> tags ,
33+ bool common);
3434
3535 public:
3636 // Accessors for name, type, tags, common and capture_and_reset_value are used
3737 // when producing the JSON message for reporting metrics.
38- const std::string name ();
39- const std::string type ();
40- const std::vector<std::string> tags ();
38+ std::string name ();
39+ std::string type ();
40+ std::vector<std::string> tags ();
4141 bool common ();
4242 uint64_t value ();
4343 uint64_t capture_and_reset_value ();
@@ -47,8 +47,7 @@ class Metric {
4747// number of actions, or incrementing the current number of actions by 1.
4848class CounterMetric : public Metric {
4949 public:
50- CounterMetric (const std::string name, const std::vector<std::string> tags,
51- bool common);
50+ CounterMetric (std::string name, std::vector<std::string> tags, bool common);
5251 void inc ();
5352 void add (uint64_t amount);
5453};
@@ -58,8 +57,7 @@ class CounterMetric : public Metric {
5857// state by 1.
5958class GaugeMetric : public Metric {
6059 public:
61- GaugeMetric (const std::string name, const std::vector<std::string> tags,
62- bool common);
60+ GaugeMetric (std::string name, std::vector<std::string> tags, bool common);
6361 void set (uint64_t value);
6462 void inc ();
6563 void add (uint64_t amount);
0 commit comments