Skip to content

Commit

Permalink
Prevent propagation of botocore logs into the Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Neale committed Jan 12, 2025
1 parent edf5718 commit d1e1404
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amazon_msk/datadog_checks/amazon_msk/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class AmazonMskCheckV2(OpenMetricsBaseCheckV2, ConfigMixin):
def __init__(self, name, init_config, instances):
super().__init__(name, init_config, instances)

# This prevents botocore INFO logs from being printed in the Agent log
# https://github.com/boto/botocore/blob/develop/botocore/credentials.py#L1075
import logging

logging.getLogger('botocore').setLevel(logging.CRITICAL)

self._region_name = None
self._exporter_data = None
self._endpoint_prefix = None
Expand Down

0 comments on commit d1e1404

Please sign in to comment.