diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2017-10-06 16:31:51 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2017-10-06 23:40:09 -0700 |
commit | 23c1d5a3e798c811292bfd37d3812a6fc68cab19 (patch) | |
tree | 8ce86f65d870f904defbc55aa0212b8cd608a6ea | |
parent | f12ff950ad2131f1bd6f5fc6bf8afc6ecd5d6628 (diff) | |
download | kafka-python-23c1d5a3e798c811292bfd37d3812a6fc68cab19.tar.gz |
Expand metrics docstrings
-rw-r--r-- | kafka/consumer/group.py | 9 | ||||
-rw-r--r-- | kafka/producer/kafka.py | 15 |
2 files changed, 17 insertions, 7 deletions
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py index b7fbd83..049d5d9 100644 --- a/kafka/consumer/group.py +++ b/kafka/consumer/group.py @@ -846,8 +846,13 @@ class KafkaConsumer(six.Iterator): log.debug("Unsubscribed all topics or patterns and assigned partitions") def metrics(self, raw=False): - """Warning: this is an unstable interface. - It may change in future releases without warning""" + """Get metrics on consumer performance. + + This is ported from the Java Consumer, for details see: + https://kafka.apache.org/documentation/#new_consumer_monitoring + + Warning: This is an unstable interface. It may change in future + releases without warning.""" if raw: return self._metrics.metrics diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index 09ca744..18a3139 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -566,10 +566,10 @@ class KafkaProducer(object): Arguments: timeout (float, optional): timeout in seconds to wait for completion. - + Raises: - KafkaTimeoutError: failure to flush buffered records within the - provided timeout + KafkaTimeoutError: failure to flush buffered records within the + provided timeout """ log.debug("Flushing accumulated records in producer.") # trace self._accumulator.begin_flush() @@ -655,8 +655,13 @@ class KafkaProducer(object): available) def metrics(self, raw=False): - """Warning: this is an unstable interface. - It may change in future releases without warning""" + """Get metrics on producer performance. + + This is ported from the Java Producer, for details see: + https://kafka.apache.org/documentation/#producer_monitoring + + Warning: This is an unstable interface. It may change in future + releases without warning.""" if raw: return self._metrics.metrics |