class_docstr: A basic dictionary based metrics reporter.
  
  Store all metrics in a two level dictionary of category > name > metric.
docstr: Return a string category for the metric.
  
  The category is made up of this reporter's prefix and the
  metric's group and tags.
  
  Examples:
      prefix = 'foo', group = 'bar', tags = {'a': 1, 'b': 2}
      returns: 'foo.bar.a=1,b=2'
  
      prefix = 'foo', group = 'bar', tags = None
      returns: 'foo.bar'
  
      prefix = None, group = 'bar', tags = None
      returns: 'bar'
docstr_tok: ["Return","a","string","category","for","the","metric",".","The","category","is","made","up","of","this","reporter","'s","prefix","and","the","metric","'s","group","and","tags",".","Examples",":","prefix","=","'foo","'",",","group","=","'bar","'",",","tags","=","{","'","a","'",":","1",",","'","b","'",":","2","}","returns",":","'foo.bar.a=1",",","b=2'","prefix","=","'foo","'",",","group","=","'bar","'",",","tags","=","None","returns",":","'foo.bar'","prefix","=","None",",","group","=","'bar","'",",","tags","=","None","returns",":","'bar","'"]
code: def get_category(self, metric):
      """
      Return a string category for the metric.
  
      The category is made up of this reporter's prefix and the
      metric's group and tags.
  
      Examples:
          prefix = 'foo', group = 'bar', tags = {'a': 1, 'b': 2}
          returns: 'foo.bar.a=1,b=2'
  
          prefix = 'foo', group = 'bar', tags = None
          returns: 'foo.bar'
  
          prefix = None, group = 'bar', tags = None
          returns: 'bar'
      """
      tags = ",".join(
          "%s=%s" % (k, v)
          for k, v in sorted(metric.metric_name.tags.items())
      )
      return ".".join(
          x for x in [self._prefix, metric.metric_name.group, tags] if x
      )
  
file_path: kafka-python/kafka/metrics/dict_reporter.py
imports: from __future__ import absolute_import
  import logging
  import threading
  from kafka.metrics.metrics_reporter import AbstractMetricsReporter
label_desc: Use image node_id 6 for calling the DictReporter obj's underlying member method code with example usage: obj.get_category(metric) and returns: str