Skip to content

Commit

Permalink
Add warning when no query is configured (#10336)
Browse files Browse the repository at this point in the history
  • Loading branch information
coignetp authored and sarah-witt committed Oct 5, 2021
1 parent c1c2187 commit a19f36b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datadog_checks_base/datadog_checks/base/utils/db/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def __init__(
query.query_data.setdefault('name', 'custom query #{}'.format(i))
self.queries.append(query)

if len(self.queries) == 0:
self.logger.warning('QueryManager initialized with no query')

def compile_queries(self):
"""This method compiles every `Query` object."""
column_transformers = COLUMN_TRANSFORMERS.copy() # type: Dict[str, Transformer]
Expand Down

0 comments on commit a19f36b

Please sign in to comment.