Skip to content

Commit 64cafe2

Browse files
authored
Reduced the volume of logging from the botocore library (#19376)
* Prevent propagation of botocore logs into the Agent * Add changelog
1 parent faf3717 commit 64cafe2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

amazon_msk/changelog.d/19376.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reduced the volume of logging from the `botocore` library

amazon_msk/datadog_checks/amazon_msk/check.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ class AmazonMskCheckV2(OpenMetricsBaseCheckV2, ConfigMixin):
3737
def __init__(self, name, init_config, instances):
3838
super().__init__(name, init_config, instances)
3939

40+
# This prevents botocore INFO logs from being printed in the Agent log
41+
# https://github.com/boto/botocore/blob/develop/botocore/credentials.py#L1075
42+
import logging
43+
44+
logging.getLogger('botocore').setLevel(logging.CRITICAL)
45+
4046
self._region_name = None
4147
self._exporter_data = None
4248
self._endpoint_prefix = None

0 commit comments

Comments
 (0)