We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9582169 commit bcf5bddCopy full SHA for bcf5bdd
1 file changed
kafka_consumer/datadog_checks/kafka_consumer/kafka_consumer.py
@@ -259,7 +259,7 @@ def report_consumer_offsets_and_lag(
259
260
partitions = self.client.get_partitions_for_topic(topic)
261
self.log.debug("Received partitions %s for topic %s", partitions, topic)
262
- if partitions is not None and partition in partitions:
+ if partition in partitions:
263
# report consumer offset if the partition is valid because even if leaderless
264
# the consumer offset will be valid once the leader failover completes
265
self.gauge('consumer_offset', consumer_offset, tags=consumer_group_tags)
0 commit comments