class_docstr: A sensor applies a continuous sequence of numerical values
  to a set of associated metrics. For example a sensor on
  message size would record a sequence of message sizes using
  the `record(double)` api and would maintain a set
  of metrics about request sizes such as the average or max.
class_docstr_tok: ["A","sensor","applies","a","continuous","sequence","of","numerical","values","to","a","set","of","associated","metrics",".","For","example","a","sensor","on","message","size","would","record","a","sequence","of","message","sizes","using","the","`","record","(","double",")","`","api","and","would","maintain","a","set","of","metrics","about","request","sizes","such","as","the","average","or","max","."]
docstr: Record a value at a known time.
  Arguments:
      value (double): The value we are recording
      time_ms (int): A POSIX timestamp in milliseconds.
          Default: The time when record() is evaluated (now)
  
  Raises:
      QuotaViolationException: if recording this value moves a
          metric beyond its configured maximum or minimum bound
docstr_tok: ["Record","a","value","at","a","known","time",".","Arguments",":","value","(","double",")",":","The","value","we","are","recording","time_ms","(","int",")",":","A","POSIX","timestamp","in","milliseconds",".","Default",":","The","time","when","record","(",")","is","evaluated","(","now",")","Raises",":","QuotaViolationException",":","if","recording","this","value","moves","a","metric","beyond","its","configured","maximum","or","minimum","bound"]
code: def record(self, value=1.0, time_ms=None):
      """
      Record a value at a known time.
      Arguments:
          value (double): The value we are recording
          time_ms (int): A POSIX timestamp in milliseconds.
              Default: The time when record() is evaluated (now)
  
      Raises:
          QuotaViolationException: if recording this value moves a
              metric beyond its configured maximum or minimum bound
      """
      if time_ms is None:
          time_ms = time.time() * 1000
      self._last_record_time = time_ms
      with self._lock:  # XXX high volume, might be performance issue
          # increment all the stats
          for stat in self._stats:
              stat.record(self._config, value, time_ms)
          self._check_quotas(time_ms)
      for parent in self._parents:
          parent.record(value, time_ms)
  
file_path: kafka-python/kafka/metrics/stats/sensor.py
imports: from __future__ import absolute_import
  import threading
  import time
  from kafka.errors import QuotaViolationError
  from kafka.metrics import KafkaMetric
label_desc: Use image node_id 5 for calling the Sensor obj's underlying member method code with example usage: obj.record(value, time_ms) without return types