Skip to content

Commit

Permalink
Refactor check to support different versions easily
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Jun 18, 2019
1 parent 79c0b64 commit 602220a
Show file tree
Hide file tree
Showing 5 changed files with 606 additions and 565 deletions.
16 changes: 16 additions & 0 deletions kafka_consumer/datadog_checks/kafka_consumer/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# (C) Datadog, Inc. 2019
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from kafka import errors as kafka_errors

# Kafka Errors
KAFKA_NO_ERROR = kafka_errors.NoError.errno
KAFKA_UNKNOWN_ERROR = kafka_errors.UnknownError.errno
KAFKA_UNKNOWN_TOPIC_OR_PARTITION = kafka_errors.UnknownTopicOrPartitionError.errno
KAFKA_NOT_LEADER_FOR_PARTITION = kafka_errors.NotLeaderForPartitionError.errno

DEFAULT_KAFKA_TIMEOUT = 5
DEFAULT_ZK_TIMEOUT = 5
DEFAULT_KAFKA_RETRIES = 3

CONTEXT_UPPER_BOUND = 200
Loading

0 comments on commit 602220a

Please sign in to comment.