Skip to content

Commit

Permalink
[AgentCheck] Deprecate read_config (#3508)
Browse files Browse the repository at this point in the history
It's only used in one check (kafka_consumer) and its usefulness in
AgentCheck is dubious IMO.
  • Loading branch information
olivielpeau authored Sep 7, 2017
1 parent 8913fc0 commit 1e98f15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,8 @@ def convert_to_underscore_separated(self, name):

@staticmethod
def read_config(instance, key, message=None, cast=None):
log.warning("Deprecation notice: the `read_config` method of `AgentCheck` is deprecated and will be removed " +
"in the next major version of the Agent")
val = instance.get(key)
if val is None:
message = message or 'Must provide `%s` value in instance config' % key
Expand Down

0 comments on commit 1e98f15

Please sign in to comment.