class_docstr: DEPRECATED
  Class for creating, modifying different metrics. And keep them in a dictionary
class_docstr_tok: ["DEPRECATED","Class","for","creating",",","modifying","different","metrics",".","And","keep","them","in","a","dictionary"]
docstr: Add a counter metric or increment an existing counter metric
  
  Parameters
  ----------
  name : str
      metric name
  value: int
      value of metric
  idx: int
      request_id index in batch
  dimensions: list
      list of dimensions for the metric
docstr_tok: ["Add","a","counter","metric","or","increment","an","existing","counter","metric","Parameters","--","--","--","--","--","name",":","str","metric","name","value",":","int","value","of","metric","idx",":","int","request_id","index","in","batch","dimensions",":","list","list","of","dimensions","for","the","metric"]
code: def add_counter(self, name, value, idx=None, dimensions=None):
      """
      Add a counter metric or increment an existing counter metric
  
      Parameters
      ----------
      name : str
          metric name
      value: int
          value of metric
      idx: int
          request_id index in batch
      dimensions: list
          list of dimensions for the metric
      """
      unit = "count"
      req_id = self._get_req(idx)
      self._add_or_update(
          name, value, req_id, unit, "counter", dimensions
      )
  
file_path: serve/ts/metrics/metrics_store.py
imports: from builtins import str
  from ts.metrics.dimension import Dimension
  from ts.metrics.metric import Metric
label_desc: Use image node_id 4 for calling the MetricsStore obj's underlying member method code with example usage: obj.add_counter(name, value, idx, dimensions) without return types