diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-08-04 14:22:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-04 14:22:40 -0700 |
commit | 68c8fa4ad01f8fef38708f257cb1c261cfac01ab (patch) | |
tree | 38d12fc11f82c492c68a4e04dbac26664862f541 /kafka/consumer/fetcher.py | |
parent | 3c9b1b6fc498f95806ee12f67f84ea548ac1378f (diff) | |
parent | 025b69ef4ae22d1677904e99f924b9ef5a096e75 (diff) | |
download | kafka-python-68c8fa4ad01f8fef38708f257cb1c261cfac01ab.tar.gz |
Merge pull request #794 from dpkp/conn_metrics
Complete metrics instrumentation
Diffstat (limited to 'kafka/consumer/fetcher.py')
-rw-r--r-- | kafka/consumer/fetcher.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py index c00681d..f5d44b1 100644 --- a/kafka/consumer/fetcher.py +++ b/kafka/consumer/fetcher.py @@ -42,11 +42,11 @@ class Fetcher(six.Iterator): 'check_crcs': True, 'skip_double_compressed_messages': False, 'iterator_refetch_records': 1, # undocumented -- interface may change + 'metric_group_prefix': 'consumer', 'api_version': (0, 8, 0), } - def __init__(self, client, subscriptions, metrics, metric_group_prefix, - **configs): + def __init__(self, client, subscriptions, metrics, **configs): """Initialize a Kafka Message Fetcher. Keyword Arguments: @@ -94,7 +94,7 @@ class Fetcher(six.Iterator): self._record_too_large_partitions = dict() # {topic_partition: offset} self._iterator = None self._fetch_futures = collections.deque() - self._sensors = FetchManagerMetrics(metrics, metric_group_prefix) + self._sensors = FetchManagerMetrics(metrics, self.config['metric_group_prefix']) def init_fetches(self): """Send FetchRequests asynchronously for all assigned partitions. |